:root {
  color-scheme: light;
  --bg: #fff;
  --surface: #f5f5f5;
  --line: #e4e4e4;
  --text: #222;
  --dim: #707070;
  --accent: #222;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Malgun Gothic",
    sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  padding: 8px 12px;
  min-height: 40px;
}
button:hover {
  background: #ebebeb;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button.primary {
  background: #222;
  color: #fff;
  border-color: #222;
}
button.danger {
  color: #a12020;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 7px;
  padding: 10px;
  background: var(--bg);
}
textarea {
  resize: vertical;
  min-height: 90px;
}
label {
  display: block;
  font-size: 13px;
  margin: 12px 0;
}
label input,
label select,
label textarea {
  margin-top: 5px;
}
input[type="checkbox"] {
  display: inline-block;
  width: 18px;
  height: 18px;
  accent-color: #222;
  margin: 0 8px 0 0;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 23px;
  letter-spacing: -0.8px;
  margin-bottom: 5px;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
.muted,
.small,
small {
  color: var(--dim);
}
.small,
small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--dim);
  margin: 0 0 8px;
  font-weight: 600;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
[hidden] {
  display: none !important;
}
.top {
  height: 66px;
  background: #171717;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 8;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  letter-spacing: 2px;
  font-weight: 600;
  font-size: 13px;
}
.brand img {
  width: 38px;
  height: 38px;
}
.brand small {
  display: block;
  font-size: 9px;
  color: #aaa;
  letter-spacing: 3px;
}
.top-actions {
  display: flex;
  gap: 7px;
}
.top-actions button {
  background: transparent;
  border-color: #555;
  color: #eee;
  font-size: 12px;
}
.top-actions button:hover {
  background: #333;
}
#unread:not(:empty) {
  border-radius: 12px;
  background: #eee;
  color: #222;
  padding: 0 5px;
  font-size: 11px;
}
.layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: calc(100dvh - 66px);
}
.sidebar {
  border-right: 1px solid var(--line);
  background: #f4f4f4;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.workspace-label {
  font-size: 15px;
  font-weight: 600;
  padding: 0 10px;
}
.workspace-label span {
  display: block;
  color: var(--dim);
  font-size: 12px;
  font-weight: 400;
  margin-top: 4px;
}
.shortcuts {
  display: grid;
  gap: 5px;
}
.shortcuts button,
.projects button,
.archive-button {
  background: transparent;
  border: 0;
  text-align: left;
  width: 100%;
}
.shortcuts small {
  font-size: 10px;
}
.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--dim);
  padding: 0 10px;
}
.side-heading button {
  border: 0;
  padding: 2px 8px;
  min-height: 30px;
  background: transparent;
}
.projects {
  display: grid;
  gap: 5px;
  margin-top: -12px;
}
.projects button {
  overflow-wrap: anywhere;
}
.projects button.active,
.shortcuts button.active {
  background: #dfdfdf;
  font-weight: 600;
}
.archive-button {
  font-size: 12px;
  color: var(--dim);
}
.side-bottom {
  font-size: 11px;
  color: var(--dim);
  margin-top: auto;
  padding: 20px 10px 0;
}
main {
  min-width: 0;
  max-width: 1200px;
  width: 100%;
}
.project-header {
  padding: 28px 30px 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.project-header p {
  font-size: 13px;
  margin-bottom: 8px;
}
.project-header .eyebrow {
  font-size: 10px;
}
.project-header button {
  font-size: 12px;
  min-width: 50px;
}
.tabs {
  display: flex;
  gap: 25px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tabs button {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 12px 0;
  white-space: nowrap;
  color: var(--dim);
  font-size: 13px;
}
.tabs button.active {
  border-bottom-color: #222;
  color: #222;
  font-weight: 600;
}
#content {
  padding: 24px 30px 40px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar p {
  margin: 0;
  font-size: 12px;
  color: var(--dim);
}
.toolbar h3 {
  margin: 0;
}
.empty {
  padding: 50px 10px;
  text-align: center;
  color: var(--dim);
}
.empty h2 {
  color: var(--text);
  font-size: 20px;
}
.empty p {
  font-size: 13px;
}
.chat-date {
  text-align: center;
  font-size: 11px;
  color: var(--dim);
  margin: 5px 0 22px;
}
.messages {
  background: var(--surface);
  padding: 20px;
  border-radius: 9px;
}
.message {
  display: flex;
  gap: 10px;
  margin-bottom: 23px;
  scroll-margin-top: 180px;
}
.message:last-child {
  margin-bottom: 0;
}
.avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #ddd;
  font-size: 12px;
}
.message-main {
  max-width: 78%;
  min-width: 0;
}
.byline {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  margin-bottom: 5px;
}
.byline b {
  font-size: 12px;
  font-weight: 500;
}
.byline time {
  color: var(--dim);
  font-size: 10px;
}
.bubble {
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 2px 13px 13px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 14px;
}
.bubble a {
  word-break: break-all;
}
.message.own {
  flex-direction: row-reverse;
}
.message.own .avatar {
  display: none;
}
.message.own .byline,
.message.own .message-actions {
  justify-content: flex-end;
}
.message.own .bubble {
  background: #252525;
  color: #fff;
  border-color: #252525;
  border-radius: 13px 2px 13px 13px;
}
.message-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.message-actions button {
  font-size: 11px;
  background: transparent;
  border: 0;
  min-height: 32px;
  padding: 2px 4px;
}
.reply {
  font-size: 11px;
  margin-bottom: 6px;
  padding-left: 8px;
  border-left: 2px solid #999;
  color: var(--dim);
}
.composer {
  margin-top: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.composer textarea {
  border: 0;
  border-radius: 0;
  min-height: 85px;
  max-height: 240px;
}
.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: #f5f5f5;
  gap: 8px;
}
.composer-footer span {
  font-size: 11px;
  color: var(--dim);
}
.composer-footer button {
  font-size: 12px;
}
.row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.row > input {
  margin-top: 5px;
}
.row h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}
.row .details {
  font-size: 12px;
  color: var(--dim);
}
.row .open-item {
  padding: 0;
  border: 0;
  text-align: left;
  background: transparent;
  font-size: 14px;
  min-height: 28px;
}
.row .complete {
  text-decoration: line-through;
  color: var(--dim);
}
.badge {
  font-size: 11px;
  padding: 3px 7px;
  background: #eee;
  border-radius: 5px;
  white-space: nowrap;
}
.row.event {
  grid-template-columns: 55px minmax(0, 1fr) auto;
}
.event-date {
  font-size: 22px;
  font-weight: 500;
}
.event-date small {
  display: block;
  font-size: 10px;
}
.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.file-row a {
  font-size: 14px;
}
.file-row small {
  display: block;
}
.record {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.record h3 {
  margin-bottom: 8px;
}
.record .markdown {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.markdown p {
  white-space: pre-wrap;
  margin-bottom: 10px;
}
.markdown pre {
  white-space: pre-wrap;
  background: #f4f4f4;
  padding: 12px;
  border-radius: 6px;
}
.record button {
  font-size: 11px;
  margin-top: 10px;
}
.mobile-project {
  display: none;
}
.enroll {
  max-width: 460px;
  padding: 42px 24px;
  margin: auto;
}
.enroll-logo {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  margin-bottom: 28px;
}
.enroll h1 {
  font-size: 29px;
  margin-bottom: 18px;
}
.enroll p {
  font-size: 13px;
}
.enroll form {
  margin-top: 26px;
}
.enroll button {
  width: 100%;
  margin-top: 12px;
}
.enroll input {
  font-size: 16px;
}
#enroll-error {
  color: #9a2525;
  margin-top: 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  max-width: 540px;
  width: calc(100% - 28px);
  max-height: 85dvh;
  color: var(--text);
  background: #fff;
  box-shadow: 0 18px 70px #0003;
}
dialog::backdrop {
  background: #0006;
}
dialog > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 16px;
}
dialog h2 {
  margin: 0;
}
dialog > header button {
  border: 0;
  min-height: 32px;
  padding: 3px 7px;
}
.form-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}
.form-actions button {
  font-size: 13px;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.checks {
  display: flex;
  gap: 7px 18px;
  flex-wrap: wrap;
}
.checks label {
  margin: 3px 0;
}
.checks input {
  margin-right: 5px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  z-index: 30;
  padding: 12px 18px;
  border-radius: 9px;
  max-width: calc(100% - 28px);
  font-size: 13px;
}
.search-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.search-controls select {
  width: auto;
  flex: 1;
  font-size: 13px;
}
.search-hit {
  display: block;
  width: 100%;
  text-align: left;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.search-hit small {
  display: block;
}
.notice {
  padding: 12px 14px;
  background: #f3f3f3;
  border-radius: 7px;
  font-size: 12px;
  margin: 12px 0;
}
.flash {
  outline: 2px solid #777;
  outline-offset: 4px;
}
.archive-banner {
  padding: 10px;
  background: #eee;
  font-size: 12px;
  margin-bottom: 20px;
  border-radius: 6px;
}
.setting-line {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.setting-line p {
  margin: 0 0 7px;
}
.settings-name {
  font-weight: 600;
}
.reminder-list {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.spinner {
  color: var(--dim);
  font-size: 13px;
}
.more {
  display: block;
  margin: 0 auto 20px;
  font-size: 12px;
}
.notes-stage {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  font-size: 13px;
}
.preview {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  color: #222;
  text-decoration: none;
  display: block;
  max-width: 380px;
}
.preview img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  display: block;
}
.preview div {
  padding: 10px;
}
.preview strong {
  font-size: 13px;
  display: block;
}
.preview small {
  font-size: 11px;
  color: #666;
  display: block;
  white-space: normal;
}
@media (max-width: 700px) {
  .top {
    height: 60px;
    padding: 0 12px;
  }
  .brand {
    font-size: 11px;
    letter-spacing: 1px;
    gap: 6px;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .brand small {
    font-size: 8px;
  }
  .top-actions {
    gap: 4px;
  }
  .top-actions button {
    padding: 7px;
    font-size: 11px;
    min-height: 40px;
  }
  .layout {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .mobile-project {
    display: flex;
    gap: 8px;
    padding: 16px 16px 0;
  }
  .mobile-project select {
    font-size: 15px;
    min-width: 0;
  }
  .mobile-project button {
    font-size: 18px;
    padding: 4px 12px;
  }
  .project-header {
    padding: 19px 16px 6px;
  }
  .project-header h1 {
    font-size: 20px;
  }
  .project-header p {
    font-size: 12px;
  }
  .tabs {
    padding: 0 16px;
    gap: 24px;
  }
  #content {
    padding: 18px 16px 30px;
  }
  .messages {
    margin: 0 -8px;
    padding: 14px 9px;
  }
  .message-main {
    max-width: 83%;
  }
  .message.own .message-main {
    max-width: 91%;
  }
  .message {
    gap: 7px;
    margin-bottom: 22px;
  }
  .bubble {
    padding: 10px 12px;
    line-height: 1.75;
  }
  .message-actions button {
    min-height: 38px;
  }
  .composer textarea {
    font-size: 16px;
  }
  .composer-footer span {
    display: none;
  }
  .composer-footer {
    justify-content: space-between;
  }
  .row {
    gap: 7px;
  }
  .row .open-item {
    font-size: 14px;
  }
  .split {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar button {
    font-size: 12px;
  }
  .enroll {
    padding-top: 35px;
  }
  dialog {
    padding: 20px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
    min-height: 44px;
  }
  input[type="checkbox"] {
    min-height: 18px;
  }
  .search-controls select {
    font-size: 14px;
  }
  .project-header .eyebrow {
    font-size: 9px;
  }
  .top-actions #install {
    max-width: 68px;
  }
  .record .markdown {
    font-size: 14px;
  }
  .file-row {
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
/* Default appearance: low-glare monochrome, including dialogs and form controls. */
:root {
  color-scheme: dark;
  --bg: #131313;
  --surface: #1b1b1b;
  --line: #333;
  --text: #e3e3e3;
  --dim: #aaa;
  --accent: #d8d8d8;
}
button {
  background: #202020;
}
button:hover {
  background: #303030;
}
button.primary {
  background: #d6d6d6;
  color: #151515;
  border-color: #d6d6d6;
}
button.danger {
  color: #efb5b5;
}
input,
select,
textarea {
  background: #1b1b1b;
  border-color: #454545;
  color: #e3e3e3;
}
input::placeholder,
textarea::placeholder {
  color: #8e8e8e;
}
input[type="checkbox"] {
  accent-color: #ccc;
}
.top {
  background: #0b0b0b;
  border-bottom: 1px solid #292929;
}
.sidebar {
  background: #171717;
}
.projects button.active,
.shortcuts button.active {
  background: #343434;
}
.tabs button.active {
  border-bottom-color: #ddd;
  color: #eee;
}
.bubble {
  background: #222;
  border-color: #3a3a3a;
  color: #dedede;
}
.message.own .bubble {
  background: #383838;
  border-color: #4b4b4b;
  color: #eee;
}
.avatar {
  background: #3c3c3c;
  color: #dedede;
}
.reply {
  border-color: #666;
}
.composer {
  background: #1b1b1b;
  border-color: #494949;
}
.composer-footer {
  background: #232323;
}
.badge {
  background: #323232;
  color: #ddd;
}
.markdown pre {
  background: #232323;
}
.notice,
.archive-banner {
  background: #2b2b2b;
}
.preview {
  background: #252525;
  color: #ddd;
}
.preview small {
  color: #aaa;
}
dialog {
  background: #1b1b1b;
  color: #e3e3e3;
  border-color: #414141;
}
dialog::backdrop {
  background: #000a;
}
#toast {
  background: #ddd;
  color: #161616;
}
#enroll-error {
  color: #efb5b5;
}
.flash {
  outline-color: #aaa;
}
a:hover {
  color: #fff;
}
