@font-face {
  font-family: Geist;
  src: url("/fonts/GeistVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/fonts/Inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/fonts/Inter-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--sp-ink);
  background: var(--sp-canvas);
  font: 15px/1.5 var(--sp-font);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 21px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.015em;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
p {
  font-family: var(--sp-body);
  line-height: 1.6;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
.personal-entry {
  display: block;
  text-align: center;
  text-decoration: none;
  margin: 18px 0 12px;
}
button,
input,
select,
textarea {
  font: inherit;
  max-width: 100%;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button,
a,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid #171717;
  outline-offset: 4px;
}
input,
select,
textarea {
  color: #171717;
  background: white;
  border: 1px solid #a3a3a3;
  border-radius: 6px;
  padding: 10px 12px;
  min-width: 0;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #171717;
  vertical-align: middle;
  cursor: pointer;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
}
input[type="search"],
select {
  height: 44px;
  width: 100%;
  font-size: 14px;
}
textarea {
  width: 100%;
  min-height: 190px;
  font: 14px/1.7 var(--sp-body);
  resize: vertical;
}
.primary,
.secondary {
  min-height: 44px;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
}
.primary {
  background: var(--sp-action);
  border: 1px solid var(--sp-action);
  color: #171717;
  box-shadow: 0 4px 4px #1717170a;
}
.primary:hover {
  background: #ed00ed;
}
.secondary {
  background: white;
  color: #171717;
  border: 1px solid #b0b0b0;
}
.secondary:hover {
  background: #f2f2f2;
}
.small-button {
  font-size: 12px;
  padding: 6px 10px;
  min-height: 36px;
}
.text-button {
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 13px;
  min-height: 44px;
  padding: 6px 0;
  white-space: nowrap;
}
.muted {
  color: var(--sp-muted);
}
.small {
  font-size: 13px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--sp-muted);
}
.wordmark {
  text-decoration: none;
  white-space: nowrap;
  font-size: 24px;
  letter-spacing: -1.2px;
  font-weight: 650;
}
.wordmark span {
  font-weight: 400;
}
.skip {
  position: fixed;
  z-index: 20;
  top: 8px;
  left: 12px;
  padding: 10px;
  background: white;
  transform: translateY(-180%);
}
.skip:focus {
  transform: none;
}
.header {
  position: sticky;
  top: 0;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: white;
  border-bottom: 1px solid var(--sp-line);
  z-index: 10;
}
.demo-chip {
  font-size: 11px;
  border: 1px solid #d7d7d7;
  padding: 3px 7px;
  border-radius: 4px;
  color: #636363;
}
.sidebar {
  position: fixed;
  width: 240px;
  top: 60px;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: white;
  border-right: 1px solid var(--sp-line);
  padding: 24px 12px;
  overflow: auto;
}
.sidebar > .eyebrow {
  padding: 0 12px;
  margin-bottom: 14px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #636363;
  border-radius: 6px;
  padding: 10px 12px;
  min-height: 44px;
  font-size: 14px;
}
.nav-item:hover,
.nav-item.active {
  background: #f2f2f2;
  color: #171717;
}
.nav-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  flex: none;
}
.nav-item b {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
}
.nav-separator {
  height: 1px;
  background: #ebebeb;
  margin: 14px 12px;
}
.side-bottom {
  margin-top: auto;
  padding: 24px 12px 0;
  font-size: 12px;
  color: #636363;
}
.side-bottom p {
  font-size: 11px;
  margin: 6px 0 24px;
}
.connected-dot,
.demo-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #176b43;
  margin-right: 5px;
}
.main {
  margin-left: 240px;
  padding: 30px 24px 48px;
  max-width: 1900px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.page-heading h1 {
  margin: 6px 0;
}
.page-heading p {
  font-size: 14px;
}
.total {
  font-size: 13px;
  color: #636363;
  font-variant-numeric: tabular-nums;
}
.demo-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f0f0;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 20px;
  font-size: 12px;
}
.demo-note p {
  flex: 1;
  font-size: 12px;
}
.demo-note b {
  font-weight: 500;
}
.demo-dot {
  background: #636363;
  flex: none;
}
.filters {
  display: grid;
  grid-template-columns:
    minmax(200px, 1.4fr) minmax(160px, 1fr) minmax(130px, 0.8fr)
    auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
}
.notice {
  border: 1px solid #c6ddcf;
  background: #edf5f0;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 14px;
}
.notice.error {
  background: #fff0f2;
  border-color: #e8a3ae;
  color: #942235;
}
.mail-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 370px) minmax(0, 1fr);
  background: white;
  border: 1px solid var(--sp-line);
  border-radius: 12px;
  overflow: hidden;
  min-height: 600px;
}
.mail-list-panel {
  border-right: 1px solid var(--sp-line);
  min-width: 0;
}
.list-top {
  min-height: 60px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  border-bottom: 1px solid var(--sp-line);
  font-size: 13px;
}
.mail-list {
  max-height: 920px;
  overflow-y: auto;
}
.selection-bar {
  background: #fafafa;
  border-bottom: 1px solid var(--sp-line);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #636363;
}
.selection-bar label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mail-row {
  display: flex;
  border-bottom: 1px solid #ebebeb;
  position: relative;
}
.mail-row:last-child {
  border-bottom: 0;
}
.mail-row.active {
  background: #f4f4f4;
  box-shadow: inset 3px 0 #171717;
}
.mail-row:hover {
  background: #fafafa;
}
.mail-row > label {
  padding: 16px 0 0 12px;
  margin: 0;
}
.mail-open {
  text-align: left;
  border: 0;
  background: transparent;
  padding: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #171717;
  min-width: 0;
}
.mail-topline {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  font-size: 12px;
}
.mail-topline > span:first-child {
  flex: 1;
}
.unread {
  font-weight: 600;
}
.mail-subject {
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  font-weight: 500;
}
.mail-snippet {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #636363;
  font: 12px/1.55 var(--sp-body);
  text-align: left;
}
.mail-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 5px;
  font-size: 10px;
  color: #636363;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  background: #f2f2f2;
  color: #555;
}
.badge.escalated {
  color: #a12339;
  background: #fff0f2;
}
.badge.important {
  background: #fff5dc;
  color: #755300;
}
.badge.normal {
  background: #eaf6ef;
  color: #176b43;
}
.badge.delete {
  background: #f2f2f2;
  color: #636363;
}
.detail {
  padding: 28px;
  min-width: 0;
}
.detail-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.detail h2 {
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.meta {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px 12px;
  font-size: 12px;
  margin-bottom: 24px;
  color: #636363;
}
.meta .avatar {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #eee;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #171717;
}
.meta b {
  color: #171717;
  font-weight: 500;
}
.meta div {
  overflow-wrap: anywhere;
}
.message-body {
  white-space: pre-wrap;
  font: 14px/1.8 var(--sp-body);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--sp-line);
  overflow-wrap: anywhere;
}
.reason {
  padding: 16px 0;
  border-bottom: 1px solid var(--sp-line);
  font-size: 12px;
  color: #636363;
}
.reason strong {
  display: block;
  color: #171717;
  font-size: 12px;
  margin-bottom: 5px;
  font-weight: 500;
}
.correction {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 12px;
}
.correction > div {
  flex: 1;
  min-width: 140px;
}
.correction label {
  font-size: 11px;
}
.correction select {
  height: 38px;
  font-size: 12px;
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 12px;
  font-size: 14px;
  font-weight: 500;
}
.conversation {
  margin: 18px 0;
  font-size: 12px;
}
.conversation summary,
.source-item summary {
  cursor: pointer;
  min-height: 32px;
}
.history-message {
  border-left: 2px solid #ddd;
  padding: 10px 14px;
  margin-top: 10px;
  white-space: pre-wrap;
}
.source-item {
  font-size: 12px;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.source-item p {
  font-size: 12px;
  margin-top: 8px;
  white-space: pre-wrap;
}
.source-item small {
  color: #636363;
}
.question {
  background: #fffaf0;
  border: 1px solid #eee1c4;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
}
.question p {
  font-size: 13px;
  margin: 8px 0 12px;
}
.question textarea {
  min-height: 90px;
  font-size: 13px;
  margin-bottom: 8px;
}
.question small {
  display: block;
  margin-top: 8px;
  color: #636363;
}
.draft-meta {
  font-size: 11px;
  color: #636363;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.draft-meta b {
  color: #171717;
  font-weight: 500;
}
.draft-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.no-reply {
  margin-top: 24px;
  padding: 16px;
  background: #f7f7f7;
  border-radius: 8px;
  font-size: 13px;
}
.no-reply p {
  margin: 6px 0;
}
.empty {
  padding: 48px 24px;
  color: #636363;
  text-align: center;
}
.empty strong {
  display: block;
  font-size: 18px;
  font-weight: 500;
  color: #171717;
  margin: 12px 0;
}
.mobile-menu,
.back-list {
  display: none;
}
dialog {
  padding: 28px;
  border: 1px solid #ddd;
  border-radius: 12px;
  max-width: min(640px, calc(100vw - 32px));
  max-height: 85vh;
  overflow: auto;
  color: #171717;
}
dialog::backdrop {
  background: #17171766;
}
dialog h2 {
  margin-bottom: 16px;
}
dialog p {
  font-size: 14px;
  margin: 12px 0;
}
dialog form {
  margin-top: 20px;
}
dialog pre {
  white-space: pre-wrap;
  font: 14px/1.7 var(--sp-body);
  padding: 16px;
  background: #f7f7f7;
  overflow-wrap: anywhere;
}
dialog li {
  font-size: 14px;
  margin: 10px 0;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
}
.login-box {
  align-self: center;
  width: min(470px, 100%);
  padding: 50px 32px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.login-box .wordmark {
  margin-bottom: 36px;
  font-size: 30px;
}
.login h1 {
  font-size: 38px;
  line-height: 1.18;
  letter-spacing: -1.4px;
}
.login p {
  color: #636363;
  font-size: 14px;
}
.login .small {
  font-size: 12px;
}
.login-aside {
  background: #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
}
.mail-outline {
  max-width: 450px;
  width: 100%;
  border: 1px solid #d6d6d6;
  border-radius: 12px;
  background: #fbfbfb;
  padding: 36px;
  box-shadow: 0 12px 40px #17171708;
  transform: rotate(-2deg);
}
.mail-outline > span {
  font-size: 12px;
  color: #636363;
}
.mail-outline strong {
  display: block;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin: 30px 0 12px;
}
.mail-outline p {
  margin-bottom: 25px;
  font-size: 13px;
}
.outline-row {
  display: flex;
  align-items: center;
  gap: 15px;
  border-top: 1px solid #e5e5e5;
  padding: 16px 0;
  font-size: 11px;
  color: #636363;
}
.outline-row span {
  flex: 1;
  font-size: 14px;
  color: #171717;
}
.outline-row b {
  font-size: 13px;
  font-weight: 500;
}
.mail-outline small {
  display: block;
  color: #636363;
  font-size: 10px;
  margin-top: 12px;
}
.text-link {
  font-size: 13px;
}
@media (min-width: 1600px) {
  .mail-workspace {
    grid-template-columns: 410px minmax(0, 1fr);
  }
  .detail {
    padding: 32px 40px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 210px;
  }
  .main {
    margin-left: 210px;
    padding: 24px 18px;
  }
  .mail-workspace {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .filters > .secondary {
    align-self: end;
  }
  .detail {
    padding: 22px;
  }
  .header {
    padding: 0 18px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .sidebar.open {
    display: flex;
    z-index: 9;
    width: 240px;
    box-shadow: 10px 0 20px #17171710;
  }
  .main {
    margin-left: 0;
  }
  .mobile-menu {
    display: block;
    min-height: 36px;
    padding: 6px 10px;
  }
  .header {
    gap: 10px;
  }
  .mail-workspace {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .wordmark {
    font-size: 22px;
  }
  .demo-chip {
    display: none;
  }
  .sp-tools {
    gap: 8px;
  }
  .sp-menu summary {
    padding: 8px;
  }
  .sp-workspace-name {
    max-width: 120px;
  }
  .login-aside {
    padding: 25px;
  }
  .login-box {
    padding: 32px;
  }
  .login h1 {
    font-size: 32px;
  }
}
@media (max-width: 680px) {
  .header {
    height: 60px;
    padding: 0 16px;
  }
  .header .sp-menu:not(.sp-menu-avatar) {
    display: none;
  }
  .main {
    padding: 24px 16px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .total {
    white-space: nowrap;
    font-size: 11px;
    margin-top: 26px;
  }
  .demo-note {
    align-items: flex-start;
    padding: 12px;
    gap: 8px;
  }
  .demo-note .text-button {
    display: none;
  }
  .demo-dot {
    margin-top: 6px;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .search-field {
    grid-column: 1/-1;
  }
  .filters > .secondary {
    grid-column: 1/-1;
    min-height: 36px;
  }
  .filters select {
    font-size: 12px;
  }
  .mail-workspace {
    display: block;
    min-height: 360px;
  }
  .mail-list-panel {
    border: 0;
  }
  .mail-list {
    max-height: none;
  }
  .detail {
    display: none;
    padding: 20px 18px;
  }
  .mail-workspace.show-detail .mail-list-panel {
    display: none;
  }
  .mail-workspace.show-detail .detail {
    display: block;
  }
  .back-list {
    display: inline-flex;
    margin-bottom: 20px;
  }
  .detail h2 {
    font-size: 22px;
  }
  .mail-open {
    padding: 16px 18px;
  }
  .login {
    display: block;
  }
  .login-aside {
    display: none;
  }
  .login-box {
    padding: 40px 24px;
  }
  .login-box .wordmark {
    margin-bottom: 20px;
  }
  .login h1 {
    font-size: 34px;
  }
  .draft-actions button {
    flex: 1;
  }
  .sp-dropdown {
    right: 0;
  }
  .correction > .secondary {
    min-height: 38px;
  }
  .side-bottom {
    padding-bottom: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.mail-workspace {
  scroll-margin-top: 76px;
}

.loading-state {
  position: fixed;
  z-index: 100;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 8px;
  background: #171717;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 6px 24px #17171722;
}
