:root {
  --ink: #324266;
  --muted: #4b6885;
  --accent: #324266;
  --line: #d0d0ce;
  --bg: #f6f8fb;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px/1.6 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  background: var(--accent);
  color: white;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 18px;
  font-weight: 650;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #e9b21e;
  outline-offset: 3px;
}
input,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #bfced6;
  border-radius: 9px;
  background: white;
  color: var(--ink);
}
input:focus,
select:focus {
  outline: 2px solid #829bb3;
}
header {
  height: 80px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 750;
  color: var(--ink);
  text-decoration: none;
}
.logo {
  background: var(--accent);
  color: white;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}
.badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #e9eef5;
  color: #324266;
  border-radius: 5px;
  padding: 4px 8px;
  margin-left: 8px;
}
main {
  max-width: 1160px;
  margin: 40px auto;
  padding: 0 24px;
  min-height: 70vh;
}
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 750;
}
h1 {
  font-size: clamp(25px, 3.3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.04em;
  margin: 8px 0 14px;
}
h2 {
  font-size: 23px;
  line-height: 1.3;
}
h3 {
  font-size: 15px;
  margin: 0 0 5px;
}
p {
  margin: 8px 0 14px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}
.connection {
  font-size: 12px;
  border: 1px solid #d0d0ce;
  background: #edf1f7;
  padding: 10px 15px;
  border-radius: 10px;
  max-width: 340px;
}
.connection.warn {
  background: #fff4de;
  border-color: #ecd8aa;
  color: #765d2b;
}
nav {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin: 20px 0 26px;
  padding-bottom: 12px;
}
nav button {
  background: transparent;
  color: var(--muted);
}
nav button.selected {
  background: var(--ink);
  color: white;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 4px 16px #234b6010;
}
.chat {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 650px;
}
.chat-head {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
}
.chat-head p {
  margin: 0;
}
.avatar {
  display: grid;
  place-items: center;
  background: #edf1f7;
  color: var(--accent);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 23px;
}
.messages {
  flex: 1;
  overflow: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.msg {
  padding: 12px 15px;
  border-radius: 12px;
  max-width: 88%;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg.model {
  background: #edf1f7;
  align-self: flex-start;
}
.msg.user {
  background: #324266;
  color: white;
  align-self: flex-end;
}
.source {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 20px;
}
.chips button,
.quiet {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
}
.compose {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.fine {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  padding: 0 20px 16px;
}
.side {
  padding: 24px;
  margin-bottom: 18px;
}
.side h2 {
  font-size: 18px;
  margin: 0 0 25px;
}
.feature {
  display: flex;
  gap: 14px;
  margin: 24px 0;
}
.feature > span {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--accent);
  padding-top: 3px;
}
.feature p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.notice {
  background: #fff7e6;
  border: 1px solid #eadcbd;
  border-radius: 12px;
  padding: 16px;
  font-size: 12px;
  color: #725d30;
}
.login {
  max-width: 480px;
  margin: 70px auto;
  padding: 32px;
}
.login form,
.survey form {
  display: grid;
  gap: 18px;
}
label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
}
.login button {
  margin-top: 5px;
}
[role="alert"] {
  color: #a23530;
}
.survey {
  max-width: 720px;
  padding: 32px;
}
.survey .notice {
  margin-top: 25px;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  font-weight: 400;
}
.checkbox input {
  width: auto;
  margin-top: 6px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 22px 0;
}
.stat {
  padding: 22px;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.stat strong {
  display: block;
  font-size: 36px;
  margin-top: 10px;
}
.summary-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.summary-grid {
  grid-template-columns: 1fr 1fr;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 16px;
}
td,
th {
  padding: 10px 5px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
td:last-child,
th:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
footer {
  text-align: center;
  padding: 35px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .badge {
    display: none;
  }
  header {
    padding: 0 18px;
  }
  main {
    margin-top: 25px;
    padding: 0 16px;
  }
  .chat {
    height: 620px;
  }
  .login {
    margin: 30px auto;
    padding: 25px;
  }
  .survey {
    padding: 24px;
  }
  .compose {
    padding: 12px;
  }
  .compose button {
    padding: 10px;
  }
  .brand {
    font-size: 16px;
  }
}

/* Official Shakarim palette: shakarim.university/kk/page/brandbook */
:root {
  --gold: #e9b21e;
  --navy: #324266;
  --steel: #4b6885;
  --sand: #d6d2c4;
}
header {
  height: 108px;
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
}
.brand {
  color: white;
  gap: 20px;
}
.university-logo {
  height: 80px;
  width: 56px;
  object-fit: contain;
  flex: none;
}
.brand-name {
  font-size: 17px;
  letter-spacing: 0.08em;
  font-weight: 750;
}
.brand-name small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #e4e8ef;
  margin-top: 4px;
}
.badge {
  background: #ffffff12;
  color: var(--gold);
  border: 1px solid #ffffff38;
  padding: 5px 10px;
}
header .quiet {
  color: white;
  background: transparent;
  border-color: #ffffff40;
}
h1,
h2,
h3,
.brand-name {
  font-family: Montserrat, system-ui, sans-serif;
}
button:hover:not(:disabled) {
  background: #263552;
  color: white;
}
.quiet:hover:not(:disabled),
.chips button:hover:not(:disabled) {
  background: #edf1f7;
  color: var(--navy);
  border-color: #829bb3;
}
.heading {
  padding: 8px 0 12px;
}
.eyebrow {
  color: var(--steel);
}
.eyebrow:before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 9px;
}
.login {
  max-width: 940px;
  margin: 54px auto;
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  padding: 0;
  overflow: hidden;
  min-height: 550px;
}
.login-brand-panel {
  background: var(--navy);
  color: white;
  padding: 42px 34px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}
.login-brand-panel:after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: 35px;
  width: 54px;
  height: 3px;
  background: var(--gold);
}
.login-brand-panel img {
  width: 140px;
  height: 200px;
  object-fit: contain;
  align-self: center;
  margin-bottom: 24px;
}
.login-brand-panel p {
  font-size: 9px;
  letter-spacing: 0.13em;
  color: var(--gold);
}
.login-brand-panel h2 {
  font-size: 24px;
  line-height: 1.35;
  margin: 6px 0 16px;
  font-weight: 650;
}
.login-brand-panel > span {
  font-size: 12px;
  color: #e4e8ef;
  margin-bottom: 16px;
}
.login-form-panel {
  padding: 40px 38px;
}
.login-form-panel h1 {
  font-size: 30px;
}
.login-form-panel > p:not(.eyebrow) {
  font-size: 13px;
  color: var(--muted);
}
.login-form-panel form {
  margin: 24px 0;
}
.login-form-panel form button {
  width: 100%;
}
.chat-head {
  border-top: 3px solid var(--gold);
}
.chat {
  height: 640px;
}
.messages:empty:after {
  content: "Задайте вопрос помощнику или откройте свою анкету";
  color: var(--muted);
  font-size: 13px;
  max-width: 260px;
  text-align: center;
  margin: auto;
  line-height: 1.8;
}
.text-link {
  color: var(--navy);
  font-size: 13px;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 5px;
}
.text-link:hover {
  color: var(--steel);
}
.side .fine {
  padding: 14px 0 0;
}
.notice {
  background: #f8f4e8;
  border-color: #e5d9b0;
  color: #62502a;
}
.connection {
  background: #edf1f7;
  border-color: #d4dce7;
  color: var(--navy);
}
.stat strong {
  font-size: 30px;
}
#nitro-mode {
  font-size: 24px;
}
.summary-title h2 {
  margin-top: 0;
}
nav {
  overflow-x: auto;
}
nav button {
  white-space: nowrap;
}
@media (max-width: 850px) {
  header {
    height: 92px;
    padding: 0 18px;
  }
  .university-logo {
    height: 66px;
    width: 46px;
  }
  .brand {
    gap: 12px;
  }
  .brand-name {
    font-size: 13px;
    letter-spacing: 0.04em;
  }
  .brand-name small {
    font-size: 8px;
    letter-spacing: 0.08em;
  }
  .login {
    grid-template-columns: 1fr;
    margin: 24px auto;
    max-width: 500px;
    min-height: 0;
  }
  .login-brand-panel {
    padding: 26px 28px;
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 0 18px;
    align-items: center;
  }
  .login-brand-panel img {
    width: 68px;
    height: 98px;
    grid-row: 1/4;
    margin: 0;
  }
  .login-brand-panel p {
    font-size: 8px;
    margin: 0;
  }
  .login-brand-panel h2 {
    font-size: 19px;
    margin: 8px 0;
  }
  .login-brand-panel > span {
    font-size: 10px;
    margin: 0;
  }
  .login-brand-panel:after {
    display: none;
  }
  .login-form-panel {
    padding: 26px;
  }
  .heading h1 {
    font-size: 29px;
  }
  main {
    padding: 0 16px;
  }
  .chat {
    height: 610px;
  }
}

.stats{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:850px){.stats{grid-template-columns:1fr}}
