* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.6 var(--font);
}
a {
  color: var(--blue);
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid #5183ef;
  outline-offset: 4px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -1px;
}
h2 {
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
}
p {
  max-width: 65ch;
}
button {
  cursor: pointer;
}
.lead {
  color: var(--muted);
  margin-top: 12px;
}
.help {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 20px;
  background: var(--blue);
  color: white;
  border: 1px solid var(--blue);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.button:hover {
  filter: brightness(0.95);
}
.button.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}
.wide {
  width: 100%;
}
.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 12px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.7px;
  color: var(--ink);
}
.brand-mark {
  position: relative;
  background: var(--blue);
  width: 35px;
  height: 35px;
  color: white;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  line-height: 1;
}
.brand-mark span {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b5dcff;
}
.notice {
  padding: 14px 17px;
  border-radius: 8px;
  background: var(--blue-soft);
  font-size: 14px;
  margin-bottom: 20px;
}
.error {
  background: #fff0f1;
  color: var(--red);
}
.success {
  background: #e7f5ec;
  color: var(--green);
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
}
label .help {
  font-weight: 400;
}
input,
textarea,
select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #bac7d8;
  border-radius: 7px;
  color: var(--ink);
  background: white;
  min-height: 46px;
}
textarea {
  resize: vertical;
}
input[readonly] {
  background: var(--canvas);
  font-size: 13px;
}
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.form-stack > .button {
  align-self: flex-start;
}
.stack {
  margin-top: 16px;
}
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}
legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  background: white;
  padding: 10px;
}
.skip:focus {
  top: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.public-shell {
  max-width: 540px;
  margin: 0 auto;
  padding: 32px 24px;
}
.public-shell header {
  display: flex;
  justify-content: center;
  margin-bottom: 42px;
}
.public-shell footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 32px;
}
.login-panel,
.visitor-card {
  background: white;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.login-panel h1 {
  font-size: 32px;
}
.login-panel .lead {
  margin-bottom: 28px;
}
.login-panel .help {
  margin-top: 12px;
}
.auth-switch {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.auth-switch p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}
.portal {
  display: block;
  width: 55px;
  height: 68px;
  border: 6px solid var(--blue);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  margin-bottom: 30px;
}
.visitor-card h1 {
  font-size: 30px;
}
.visitor-card .description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 20px 0;
}
.visitor-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 28px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}
.visitor-card .notice {
  margin-top: 24px;
}
.empty-symbol {
  font-size: 40px;
  color: var(--blue);
  display: block;
  margin-bottom: 15px;
}
@media (max-width: 600px) {
  .field-pair {
    grid-template-columns: 1fr;
  }
  .login-panel,
  .visitor-card {
    padding: 26px;
  }
  .public-shell {
    padding: 24px 16px;
  }
}

.breadcrumbs {
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.breadcrumbs li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.breadcrumbs li + li::before {
  content: '/';
  color: var(--muted);
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.breadcrumbs a:hover {
  color: var(--blue);
}
.breadcrumbs [aria-current] {
  color: var(--ink);
}
.section-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.section-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 2px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.section-tabs a:hover {
  color: var(--blue);
}
.section-tabs a[aria-current] {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
@media (max-width: 480px) {
  .section-tabs {
    gap: 20px;
  }
}

.telegram-connect {
  max-width: 560px;
  margin-inline: auto;
}
.public-shell .telegram-connect-intro {
  display: block;
  margin: 0;
}
.telegram-connect-intro h1 {
  margin-bottom: 18px;
}
.telegram-connect-intro .help {
  margin-top: 12px;
}
.telegram-connect-action {
  display: flex;
  justify-content: center;
  margin-block: 28px 32px;
}
.telegram-connect-scan {
  padding-top: 28px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.telegram-connect-scan img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px auto 0;
}
.telegram-connect-footer {
  margin-top: 28px;
  text-align: center;
}
.telegram-connect-footer .help {
  margin-bottom: 24px;
}

input[type='checkbox'] {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  margin: 0;
  flex: 0 0 18px;
  accent-color: var(--blue);
}
.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 500;
}
