@font-face {
  font-family: JuneSystem;
  src: local("Arial");
}
:root {
  font-family: JuneSystem, system-ui, sans-serif;
  color: #24392e;
  background: #f6f5f0;
  font-synthesis: none;
  line-height: 1.55;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main,
footer {
  max-width: 1000px;
  margin: auto;
  padding: 24px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #d9ddd4;
}
.wordmark {
  font-size: 38px;
  letter-spacing: -2px;
  font-weight: 700;
  color: #24392e;
  text-decoration: none;
}
.wordmark span {
  color: #81762b;
}
.beta,
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.beta {
  border: 1px solid #c4cdbf;
  border-radius: 30px;
  padding: 6px 12px;
}
main {
  min-height: 75vh;
  padding-top: 64px;
}
footer {
  font-size: 14px;
  color: #566354;
  border-top: 1px solid #d9ddd4;
}
h1,
h2,
h3 {
  font-weight: 500;
  line-height: 1.15;
}
h1 {
  font-family: Georgia, serif;
  font-size: clamp(36px, 6vw, 54px);
  letter-spacing: -1.5px;
  margin: 14px 0 20px;
}
h2 {
  font-size: 24px;
}
h3 {
  font-size: 19px;
}
p {
  max-width: 62ch;
  overflow-wrap: anywhere;
  color: #4f5f51;
}
.intro {
  max-width: 620px;
  margin-bottom: 34px;
}
.card {
  background: #fffefa;
  border: 1px solid #d9ddd4;
  border-radius: 18px;
  padding: 30px;
  max-width: 500px;
  margin-bottom: 24px;
}
.auth-card button {
  width: 100%;
}
.auth-card > button + p,
.auth-card > button,
.auth-card form + button {
  margin-top: 16px;
}
.auth-card .show-password {
  margin: 8px 0 16px;
  font-weight: 400;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.grid .card {
  max-width: none;
}
.grid > * {
  min-width: 0;
}
label {
  display: block;
  margin: 20px 0 7px;
  font-weight: 600;
  font-size: 14px;
}
input,
select,
button {
  max-width: 100%;
  overflow-wrap: anywhere;
  font: inherit;
  min-height: 48px;
  border-radius: 8px;
}
input,
select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #9aa896;
  background: #fff;
  color: #24392e;
}
label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex: 0 0 20px;
  margin: 0;
  padding: 0;
}
button {
  padding: 11px 20px;
  background: #294635;
  border: 1px solid #294635;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}
button:hover {
  background: #365b45;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.secondary {
  background: transparent;
  color: #294635;
  border-color: #acb7a7;
}
.secondary:hover {
  background: #eef1e9;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.actions button {
  flex-grow: 1;
}
.hint {
  font-size: 14px;
}
.notice {
  padding: 14px 18px;
  background: #ebeede;
  border-radius: 10px;
}
.error {
  color: #893726;
}
.success {
  color: #2d5536;
}
a {
  color: #294635;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ac781b;
  outline-offset: 4px;
}
#status:empty {
  display: none;
}
#status {
  margin: 20px 0;
}
.skip {
  position: absolute;
  top: -70px;
  left: 20px;
  padding: 10px;
  background: #fff;
  z-index: 10;
}
.skip:focus {
  top: 10px;
}
.row {
  padding: 16px 0;
  border-top: 1px solid #dde0d8;
  overflow-wrap: anywhere;
}
.row p {
  margin: 6px 0;
}
.row button {
  margin-top: 8px;
  min-height: 44px;
}
.small {
  font-size: 13px;
}
.value {
  overflow-wrap: anywhere;
  font-family: monospace;
  font-size: 13px;
}
nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
nav a {
  padding: 8px 12px;
  background: #ebeede;
  border-radius: 8px;
}
.link-box {
  margin: 16px 0;
}
ul {
  padding-left: 22px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 640px) {
  header,
  main,
  footer {
    padding: 20px;
  }
  main {
    padding-top: 36px;
  }
  .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .card {
    padding: 22px;
    border-radius: 14px;
  }
  .actions {
    flex-direction: column;
  }
  h1 {
    font-size: 38px;
  }
  header .wordmark {
    font-size: 34px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background 0.15s;
  }
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr);
  gap: 24px;
}
.chat-layout .card {
  max-width: none;
  min-width: 0;
}
.conversation {
  display: block;
  width: 100%;
  text-align: left;
  margin: 10px 0;
  font-weight: 400;
}
.conversation[aria-current] {
  background: #ebeede;
  border-color: #294635;
}
.chat-message {
  border-bottom: 1px solid #dde0d8;
  padding: 20px 0;
}
.chat-message p {
  white-space: pre-wrap;
}
.chat-message h3 {
  font-size: 16px;
  font-weight: 600;
}
.chat-message details {
  font-size: 14px;
}
textarea {
  font: inherit;
  width: 100%;
  resize: vertical;
  padding: 12px;
  border: 1px solid #9aa896;
  border-radius: 8px;
}
.message-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
dd {
  margin: 4px 0 16px;
  overflow-wrap: anywhere;
}
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #ac781b;
  outline-offset: 4px;
}
@media (max-width: 760px) {
  .chat-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}

.invitation-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  color: #24392e;
  background: #fffefa;
  border: 1px solid #acb7a7;
  border-radius: 18px;
  box-shadow: 0 16px 60px #24392e33;
  overscroll-behavior: contain;
}
.invitation-dialog::backdrop {
  background: #16231bd9;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dialog-heading h2 {
  margin: 0;
}
.invitation-dialog section,
.invitation-dialog form {
  margin-bottom: 24px;
}
.invitation-dialog summary {
  cursor: pointer;
  padding: 12px 0;
}
.app-nav {
  display: grid;
  grid-template-columns: 0.85fr 1fr 1.2fr 1fr;
  gap: 4px;
  margin: 0 0 36px;
  padding-bottom: 16px;
  border-bottom: 1px solid #d9ddd4;
}
.app-nav button {
  font-size: 14px;
  padding: 10px 2px;
  white-space: nowrap;
}
.app-nav button[aria-current="page"] {
  background: #294635;
  color: #fff;
}
.setup-flow {
  max-width: 540px;
  margin: 0 auto;
}
.setup-card {
  max-width: none;
}
.setup-card > button + button {
  margin-top: 12px;
}
.setup-card > button {
  width: 100%;
}
.profile-names {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
#profile-save {
  width: 100%;
}
@media (max-width: 420px) {
  .profile-names {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
.setup-flow nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.home-start {
  max-width: 680px;
}
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 20px;
  background: #294635;
  border: 1px solid #294635;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
a.button[hidden] {
  display: none;
}
a.button:hover {
  background: #365b45;
}

.telegram-qr {
  max-width: 100%;
  height: auto;
}
