:root {
  --paper: #f6f4ee;
  --white: #fffefa;
  --ink: #202820;
  --muted: #74796f;
  --line: #dedfd4;
  --copper: #ad6f46;
  --copper-light: #f0e5d8;
  --green: #42664a;
  --radius: 8px;
  font-family:
    "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  font-synthesis: none;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  z-index: 100;
  left: 16px;
  top: -80px;
  background: var(--ink);
  color: white;
  padding: 14px;
}
.skip-link:focus {
  top: 12px;
}
.workspace {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  width: 244px;
  height: 100dvh;
  border-right: 1px solid var(--line);
  background: #eeeee5;
  display: flex;
  flex-direction: column;
  padding: 34px 22px 18px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 25px;
  letter-spacing: 1px;
}
.brand-symbol {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid currentColor;
  position: relative;
  font-size: 27px;
}
.brand-symbol:after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  background: var(--copper);
  width: 8px;
  height: 8px;
}
.brand small {
  display: block;
  font:
    10px "Segoe UI",
    "PingFang SC",
    sans-serif;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 4px;
}
.navigation {
  overflow: auto;
  margin: 43px -7px 20px;
  padding: 0 7px;
  scrollbar-width: thin;
}
.nav-group {
  margin-bottom: 27px;
}
.nav-label {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  padding-left: 12px;
  margin: 0 0 10px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  margin: 3px 0;
  border-radius: 5px;
  color: #5d655b;
  transition: background 0.15s;
}
.nav-link:hover {
  background: #e3e5da;
}
.nav-link.active {
  background: var(--ink);
  color: var(--white);
}
.nav-symbol {
  font-size: 17px;
  width: 20px;
  text-align: center;
}
.account {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.account small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.avatar {
  background: #dce1d2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
}
.account .button {
  margin-left: auto;
  padding: 5px;
}
.main-column {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 82px;
  padding: 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.6);
}
.workspace-label {
  font-size: 10px;
  letter-spacing: 1.8px;
}
.workspace-label span {
  color: var(--muted);
  letter-spacing: 0.5px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 27px;
  font-size: 12px;
}
.connection {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.connection:before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
}
.connection[data-offline="true"]:before {
  background: var(--copper);
}
.inbox-link {
  position: relative;
}
.count {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 20px;
  background: var(--copper);
  color: white;
  font-size: 10px;
}
.count[hidden] {
  display: none;
}
.content {
  max-width: 1440px;
  margin: auto;
  padding: 46px 44px 80px;
  outline: none;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 33px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--copper);
  margin: 0 0 12px;
  font-weight: 600;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.7px;
  margin-bottom: 11px;
}
h2 {
  font-size: 17px;
  font-weight: 500;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
.muted {
  color: var(--muted);
  line-height: 1.8;
}
.page-heading .muted {
  margin: 0;
  font-size: 13px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 10px 17px;
  border-radius: 5px;
  color: var(--ink);
  min-height: 40px;
  font-size: 13px;
  transition: background 0.15s;
}
.button:hover {
  background: #eceee4;
}
.button.primary {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.button.primary:hover {
  background: #3b4939;
}
.button.copper {
  background: var(--copper);
  color: white;
  border-color: var(--copper);
}
.button.danger {
  color: #a04435;
  border-color: #e1c8c0;
}
.button.quiet,
.button.text {
  border-color: transparent;
  background: transparent;
}
.button.text {
  min-height: 32px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.panel {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 23px;
}
.panel > h2 {
  margin-bottom: 24px;
}
.record-list {
  border-top: 1px solid var(--line);
}
.record {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 22px 2px;
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  background: transparent;
  text-align: left;
  color: inherit;
}
.record-body {
  min-width: 0;
  flex: 1;
}
.record-body strong {
  font-size: 14px;
  font-weight: 500;
  display: block;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.record-meta {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 7px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.record-arrow {
  font-size: 19px;
  color: var(--muted);
}
button.record:hover {
  background: #eeeee4;
}
.badge {
  font-size: 11px;
  padding: 5px 9px;
  background: #eeeee8;
  border: 1px solid #dedfd6;
  color: #6e7469;
  border-radius: 4px;
  white-space: nowrap;
}
.badge.good {
  background: #e8eee4;
  border-color: #d4dfcd;
  color: #42624b;
}
.badge.warn {
  background: #f6e9de;
  border-color: #e8d5c4;
  color: #9a623e;
}
.empty-state {
  border: 1px dashed #d0d4c5;
  padding: 60px 30px;
  text-align: center;
  background: #f1f2e9;
  border-radius: var(--radius);
}
.empty-state h2 {
  margin: 18px 0 8px;
}
.empty-state .muted {
  font-size: 13px;
}
.empty-mark {
  font-size: 40px;
  color: #9ba58e;
  font-family: Georgia, serif;
}
.notice {
  padding: 13px 20px;
  background: #eee7d9;
  border: 1px solid #dfd4be;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  border-radius: 5px;
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 13px;
}
.notice.error {
  background: #f4e7e1;
  border-color: #e6cdc1;
  color: #854c38;
}
.notice .button {
  flex-shrink: 0;
}
#update-slot:not(:empty) {
  padding: 16px 42px 0;
}
#update-slot .notice {
  margin: 0;
}
.loading {
  padding: 70px 0;
  text-align: center;
  color: var(--muted);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0 0 20px;
  font-size: 12px;
}
.field > span {
  font-weight: 500;
}
input,
textarea,
select {
  border: 1px solid #d8dbcf;
  background: var(--white);
  padding: 12px 13px;
  border-radius: 5px;
  color: var(--ink);
  width: 100%;
  min-height: 44px;
}
textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.8;
}
input::placeholder,
textarea::placeholder {
  color: #999d92;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.details {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 15px;
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}
.details dt {
  color: var(--muted);
}
.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}
.stat {
  border-left: 2px solid #c6ccba;
  padding: 5px 18px;
}
.stat strong {
  display: block;
  font:
    32px Georgia,
    serif;
  margin-bottom: 8px;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.split {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
}
.subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.subheading h2 {
  margin: 0;
}
.message {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.message.user {
  padding-left: 20px;
  border-left: 2px solid var(--copper);
}
.message-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.95;
  font-size: 14px;
}
.code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.inline-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.tag-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.mobile-nav {
  display: none;
}
.auth-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-story {
  background: var(--ink);
  color: var(--paper);
  padding: 60px 11%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-story:after {
  content: "";
  position: absolute;
  width: 390px;
  height: 390px;
  border: 1px solid #52614c;
  border-radius: 50%;
  right: -210px;
  bottom: 12%;
  box-shadow:
    0 0 0 45px #283226,
    0 0 0 46px #3d4c37,
    0 0 0 90px #263023,
    0 0 0 91px #36452f;
  opacity: 0.65;
  pointer-events: none;
}
.auth-story .eyebrow {
  color: #c79b7b;
  font-size: 11px;
  margin-bottom: 27px;
}
.auth-story h1 {
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(32px, 3.4vw, 55px);
  line-height: 1.6;
  letter-spacing: 1px;
  font-weight: 400;
  margin-bottom: 24px;
}
.auth-story p:not(.eyebrow) {
  font-size: 14px;
  color: #b3bead;
  line-height: 2;
}
.auth-footer {
  font-size: 11px;
  color: #9ba691;
  display: flex;
  justify-content: space-between;
  letter-spacing: 1px;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 60px;
}
.auth-card {
  max-width: 365px;
  width: 100%;
}
.auth-card h2 {
  font-size: 27px;
  margin-bottom: 13px;
}
.auth-card > .muted {
  font-size: 13px;
  margin-bottom: 33px;
}
.auth-form .primary {
  width: 100%;
  margin-top: 8px;
}
.auth-note {
  border-top: 1px solid var(--line);
  margin-top: 35px;
  padding-top: 20px;
  font-size: 11px;
  color: var(--muted);
}
.auth-error {
  max-width: 650px;
  margin: 15vh auto;
  padding: 20px;
}
.toast {
  background: var(--ink);
  color: var(--white);
  padding: 15px 20px;
  border-radius: 6px;
  box-shadow: 0 10px 40px #20282022;
  font-size: 13px;
  line-height: 1.7;
  max-width: 420px;
  animation: appear 0.2s ease-out;
}
#toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: grid;
  gap: 10px;
}
.module-root {
  animation: appear 0.2s ease-out;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1500px) {
  .content {
    padding: 60px 65px;
  }
  .topbar {
    padding: 0 65px;
  }
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 205px 1fr;
  }
  .sidebar {
    width: 205px;
    padding: 27px 17px 18px;
  }
  .content {
    padding: 32px 28px 65px;
  }
  .topbar {
    padding: 0 28px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .account .avatar {
    display: none;
  }
  .topbar-actions {
    gap: 18px;
  }
  .workspace-label span {
    display: none;
  }
}
@media (max-width: 760px) {
  .workspace {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: 0;
    padding: 20px 22px 0;
    background: var(--paper);
  }
  .sidebar > .brand {
    font-size: 23px;
  }
  .brand small {
    font-size: 9px;
  }
  .sidebar .brand-symbol {
    width: 34px;
    height: 34px;
    font-size: 24px;
  }
  .account {
    position: absolute;
    right: 20px;
    top: 24px;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .account > div {
    display: none;
  }
  .navigation {
    margin: 20px -22px 0;
    padding: 0 15px;
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
  }
  .nav-group {
    display: contents;
  }
  .nav-label,
  .nav-symbol {
    display: none;
  }
  .nav-link {
    white-space: nowrap;
    font-size: 12px;
    padding: 10px 14px;
    border-radius: 4px 4px 0 0;
    margin-bottom: 0;
  }
  .topbar {
    height: 51px;
    padding: 0 22px;
    background: transparent;
    border-bottom: 0;
  }
  .workspace-label {
    font-size: 9px;
  }
  .connection {
    font-size: 10px;
  }
  .topbar-actions {
    gap: 13px;
  }
  .inbox-link {
    font-size: 11px;
  }
  .content {
    padding: 23px 22px 100px;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 13px;
  }
  h1 {
    font-size: 27px;
  }
  .page-heading .muted {
    font-size: 12px;
    max-width: 280px;
  }
  .page-heading > .button {
    padding: 8px 12px;
    min-height: 36px;
    font-size: 12px;
    white-space: nowrap;
    margin-top: 25px;
  }
  .panel {
    padding: 20px 17px;
  }
  .record {
    padding: 20px 0;
    gap: 12px;
  }
  .record-arrow {
    display: none;
  }
  .record-body strong {
    font-size: 13px;
  }
  .record-meta {
    font-size: 11px;
  }
  .badge {
    font-size: 10px;
    padding: 4px 6px;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--ink);
    color: #edf0e5;
    justify-content: space-around;
    padding: 17px 10px calc(17px + env(safe-area-inset-bottom));
    font-size: 12px;
    z-index: 20;
  }
  .mobile-nav a {
    padding: 3px 10px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .details {
    grid-template-columns: 85px 1fr;
    gap: 12px;
    font-size: 12px;
  }
  .stat-grid {
    gap: 10px;
  }
  .stat {
    padding: 3px 10px;
  }
  .stat strong {
    font-size: 27px;
  }
  .stat span {
    font-size: 11px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-story {
    min-height: 310px;
    padding: 30px 28px;
  }
  .auth-story > .brand {
    font-size: 22px;
  }
  .auth-story h1 {
    font-size: 32px;
    line-height: 1.5;
    margin: 21px 0 13px;
  }
  .auth-story .eyebrow,
  .auth-story p:not(.eyebrow),
  .auth-footer {
    display: none;
  }
  .auth-story:after {
    width: 220px;
    height: 220px;
    right: -120px;
    bottom: -10px;
  }
  .auth-panel {
    padding: 35px 28px 60px;
  }
  .auth-card {
    max-width: 450px;
  }
  .auth-card h2 {
    font-size: 24px;
  }
  .auth-card > .muted {
    margin-bottom: 25px;
  }
  .auth-note {
    margin-top: 26px;
  }
  #toasts {
    left: 20px;
    right: 20px;
    bottom: 85px;
  }
  #update-slot:not(:empty) {
    padding: 10px 22px 0;
  }
  .notice {
    padding: 12px;
    gap: 10px;
    font-size: 12px;
    flex-wrap: wrap;
  }
  .empty-state {
    padding: 40px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.7;
}
.checkbox input {
  width: 17px;
  height: 17px;
  min-height: 17px;
  accent-color: var(--green);
}
.node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 20px;
}
.node-grid .panel {
  margin-bottom: 0;
}

.spaced {
  margin-top: 20px;
}
.compact-note {
  margin: 7px 0 0;
}
.top-note {
  margin: 15px 0 0;
}
.top-section {
  margin-top: 25px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 22px 0;
  flex-wrap: wrap;
}
.enrollment-secret {
  margin-top: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.enrollment-secret > div {
  flex: 1;
  min-width: 180px;
}
.enrollment-secret code {
  user-select: all;
}
[hidden] {
  display: none !important;
}
.manager-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.manager-choice {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.manager-choice .eyebrow {
  margin: 0;
  font-size: 9px;
}
.manager-choice strong {
  font-size: 15px;
  font-weight: 500;
}
.manager-choice.selected {
  border-color: var(--copper);
  background: #f2ebe0;
}
.manager-choice:hover {
  border-color: var(--copper);
}

.inbox-link {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}
@media (max-width: 760px) {
  .mobile-nav {
    padding-top: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .mobile-nav a {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
