/* Brand palette: RUT (MIIT), brandbook p. 16. Screen values use sRGB. */
:root {
  --font-ui: Arial, Helvetica, system-ui, sans-serif;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 20px;
  --text-xl: 24px;
  --heading-sm: 28px;
  --heading-lg: 36px;
  --brand-gray: #a2acab;
  --brand-white: #ffffff;
  --brand-blue: #0072ce;
  --brand-navy: #1b365d;
  --brand-black: #101820;
  --bg: #f3f5f6;
  --canvas: var(--bg);
  --surface: var(--brand-white);
  --surface-soft: #f3f5f6;
  --text: var(--brand-black);
  --ink: var(--text);
  --muted: #536777;
  --text-soft: var(--muted);
  --text-muted: var(--muted);
  --border: #d8dfe3;
  --line: var(--border);
  --primary: var(--brand-blue);
  --primary-dark: var(--brand-navy);
  --primary-soft: #e8f2fa;
  --green: #176448;
  --orange: #a66400;
  --amber: #a66400;
  --red: #a3333b;
  --sidebar: var(--brand-navy);
  --sidebar-light: var(--brand-black);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 6px 24px #10182008;
}
* {
  box-sizing: border-box;
}
body {
  font-size: var(--text-base);
  margin: 0;
  line-height: 1.45;
}
.shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px;
}
.topbar {
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, #536777, #0072ce);
  color: #ffffff;
  font-size: var(--text-lg);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(27, 54, 93, 0.25);
}
.brand strong,
.brand h1 {
  display: block;
  font-size: 19px;
  line-height: 1.1;
  margin: 0;
}
.brand small,
.brand p {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
}
.brand--center {
  justify-content: center;
  margin-bottom: 26px;
}
.brand--center .brand__mark {
  width: 54px;
  height: 54px;
  font-size: var(--text-xl);
}
.brand--center h1 {
  font-size: 26px;
}
.login-view {
  min-height: 80vh;
  display: grid;
  place-content: center;
}
.login-card {
  width: min(100%, 420px);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.hero {
  margin: 20px 0 34px;
  border-radius: 24px;
  padding: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  color: #ffffff;
  background:
    radial-gradient(circle at 95% 0, #a2acab 0, transparent 32%),
    linear-gradient(125deg, #1b365d, #536777);
}
.hero h1 {
  max-width: 660px;
  line-height: 1.04;
  margin: 8px 0 12px;
}
.hero p {
  max-width: 600px;
  margin: 0;
}
.hero__metric {
  display: grid;
  grid-template-columns: auto auto;
  gap: 1px 14px;
  min-width: 160px;
  padding: 20px;
  border: 1px solid rgba(27, 54, 93, 0.2);
}
.hero__metric strong {
  font-size: var(--heading-sm);
}
.hero__metric span {
  align-self: center;
  color: #f3f5f6;
  font-size: var(--text-sm);
}
.eyebrow {
  display: block;
  color: var(--primary);
  font-size: var(--text-xs);
  font-weight: 750;
  letter-spacing: 0.09em;
}
.section {
  margin-top: 38px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin: 0 0 16px;
}
.section-heading h2,
.form-card h2 {
  margin: 4px 0 0;
  font-size: 22px;
}
.grid {
  display: grid;
  gap: 18px;
}
.grid--forms {
  grid-template-columns: 1fr 1.4fr;
}
.grid--groups {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.form-card label,
.chat-bind label {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  font-size: var(--text-sm);
  font-weight: 650;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.checkbox {
  display: flex !important;
  align-items: center;
  gap: 8px;
}
.checkbox input {
  width: auto;
}
input,
textarea,
select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #e4e9ec;
  border-radius: 10px;
  background: #ffffff;
  color: inherit;
  font: inherit;
  font-size: var(--text-sm);
}
textarea {
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid #f3f5f6;
  border-color: #a2acab;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}
.button:hover {
  filter: brightness(0.97);
}
.button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.button--primary {
  margin-top: 18px;
  background: var(--primary);
  color: #ffffff;
}
.muted {
  color: var(--muted);
  font-size: var(--text-sm);
}
.group-card__top,
.assignment-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.group-card h3,
.assignment-card h3 {
  margin: 0;
  font-size: var(--text-lg);
}
.course {
  margin: 3px 0 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  height: 25px;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: var(--text-xs);
  font-weight: 700;
}
.invite {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 9px;
  margin: 18px 0 9px;
  padding: 10px;
  border-radius: 12px;
  background: #ffffff;
  font-size: var(--text-xs);
  color: var(--muted);
}
code {
  font:
    700 13px ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  color: var(--primary-dark);
}
.chat-bind {
  display: flex;
  align-items: end;
  gap: 9px;
}
.chat-bind label {
  flex: 1;
}
.chat-bind .button {
  margin-bottom: 0;
}
.export-csv {
  margin-top: 14px;
}
.assignment-list {
  display: grid;
  gap: 16px;
}
.assignment-card {
  position: relative;
}
.assignment-description {
  margin: 13px 0;
  color: #0072ce;
  white-space: pre-wrap;
}
.assignment-meta {
  display: flex;
  gap: 38px;
  margin: 16px 0;
}
.assignment-meta dt {
  color: var(--muted);
  font-size: var(--text-xs);
}
.assignment-meta dd {
  margin: 2px 0 0;
  font-weight: 700;
  font-size: var(--text-sm);
}
.materials {
  margin-top: 12px;
  padding: 14px;
  border-radius: 13px;
  background: #ffffff;
  font-size: var(--text-sm);
}
.materials strong {
  font-size: var(--text-sm);
}
.material-list {
  margin: 6px 0 10px;
  padding-left: 20px;
}
.material-list li {
  margin: 3px 0;
}
.material-list a {
  color: var(--primary);
}
.upload-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.upload-form input {
  padding: 5px;
  font-size: var(--text-xs);
}
.upload-form .button {
  white-space: nowrap;
}
.assignment-actions {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}
.assignment-actions .button {
  margin-top: 0;
}
.submission-panel {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.submission-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.submission-table th,
.submission-table td {
  text-align: left;
  padding: 9px 7px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.submission-table th {
  color: var(--muted);
  font-weight: 650;
}
.status-draft {
  background: #f3f5f6;
  color: #0072ce;
}
.status-published {
  background: #f3f5f6;
  color: var(--green);
}
.status-reviewed {
  background: #f3f5f6;
  color: #0072ce;
}
.empty {
  text-align: center;
}
.notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 390px;
  padding: 13px 16px;
  border-radius: 12px;
  background: #1b365d;
  color: #ffffff;
  box-shadow: var(--shadow);
  z-index: 10;
}
.notice.error {
  background: #8e2542;
}
.notice.success {
  background: #1b365d;
}
@media (max-width: 720px) {
  .shell {
    padding: 15px;
  }
  .hero {
    padding: 24px;
    align-items: flex-start;
    flex-direction: column;
  }
  .grid--forms {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .topbar__right .muted {
    display: none;
  }
  .invite {
    grid-template-columns: 1fr auto;
  }
  .invite .copy-code {
    grid-column: 1/-1;
  }
  .chat-bind {
    flex-direction: column;
    align-items: stretch;
  }
  .assignment-meta {
    gap: 20px;
  }
  .upload-form {
    align-items: stretch;
    flex-direction: column;
  }
  .submission-table {
    display: block;
    overflow-x: auto;
  }
}

.card,
.hero {
  border-radius: 8px;
}

.brand__mark,
.button,
.pill,
.invite,
.assignment-meta div,
.empty,
.notice {
  border-radius: 6px;
}

.brand__mark,
.button--primary {
  background: var(--primary);
  box-shadow: none;
}

.button--primary:hover {
  background: var(--primary-dark);
}

.button--quiet,
.pill {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.hero {
  min-height: 190px;
  background-color: #1b365d;
  background-image:
    linear-gradient(
      135deg,
      transparent 0 68%,
      rgba(27, 54, 93, 0.11) 68% 70%,
      transparent 70%
    ),
    linear-gradient(
      45deg,
      transparent 0 77%,
      rgba(27, 54, 93, 0.16) 77% 79%,
      transparent 79%
    );
}

.hero h1 {
  font-size: 40px;
  letter-spacing: 0;
}

.hero__metric {
  border-radius: 6px;
  background: rgba(27, 54, 93, 0.08);
}

.hero__metric span,
.hero__metric small {
  color: #ffffff;
}

.hero__metric small {
  grid-column: 1 / -1;
  margin-top: 8px;
  font-size: var(--text-xs);
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1b365d;
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
}

.sync-state::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.sync-state--offline {
  color: #536777;
}

.sync-state--offline::before {
  background: #a2acab;
}

.login-view {
  animation: enter 360ms ease-out both;
}

.login-card {
  border-top: 4px solid #1b365d;
}

.login-error {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 700;
}

.login-switch {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  text-align: center;
}

.login-switch a,
.material-list a {
  color: #1b365d;
  font-weight: 700;
}

.social-layout,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.5fr);
  gap: 18px;
  margin-top: 28px;
}

.people-panel,
.conversation-panel {
  min-height: 580px;
}

.people-panel h1,
.conversation-panel h2,
.settings-grid h1,
.settings-grid h2 {
  margin: 5px 0 18px;
}

.search-form,
#message-form,
#profile-form,
#avatar-form,
#password-form {
  display: grid;
  gap: 12px;
}

.people-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.message-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 10px 12px;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 800;
}

.tab-button.is-active {
  border-bottom-color: #1b365d;
  color: #1b365d;
}

.profile-card {
  display: grid;
  gap: 12px;
}
.profile-card h3,
.profile-card p {
  margin: 0;
}
.profile-card__avatar {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #1b365d;
  color: #ffffff;
  font-size: var(--heading-sm);
  font-weight: 800;
}
.profile-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.notifications {
  position: relative;
  font-size: var(--text-sm);
}
.notifications summary {
  cursor: pointer;
  color: #1b365d;
  font-weight: 800;
  white-space: nowrap;
}
.notification-count,
.message-count {
  display: inline-block;
  margin-left: 4px;
  border-radius: 10px;
  background: #1b365d;
  color: #ffffff;
  padding: 1px 6px;
  font-size: var(--text-xs);
}
.message-count {
  background: #0072ce;
}
.notifications__list {
  position: absolute;
  z-index: 5;
  right: 0;
  top: 28px;
  display: grid;
  width: min(340px, 80vw);
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 8px 24px #10182024;
}
.notifications__list a,
.notifications__list p {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 12px;
  color: var(--ink);
  text-decoration: none;
}
.notifications__list a + a {
  border-top: 1px solid var(--line);
}
.notifications__list span {
  color: var(--muted);
}
.student-directory,
.calendar-list {
  display: grid;
  gap: 12px;
}
.student-card,
.calendar-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.student-card h2 {
  margin: 0;
  font-size: var(--text-lg);
}
.student-card p {
  margin: 5px 0 0;
}
.student-card dl {
  display: flex;
  gap: 18px;
  margin: 0;
}
.student-card dt {
  color: var(--muted);
  font-size: var(--text-xs);
}
.student-card dd {
  margin: 2px 0 0;
  font-size: var(--text-lg);
  font-weight: 800;
}
.student-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.student-history {
  grid-column: 1 / -1;
  width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.student-history ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.student-history li {
  padding: 8px;
  background: #f3f5f6;
}
.student-history span {
  color: var(--muted);
  font-size: var(--text-sm);
}
.table-filter {
  max-width: 300px;
}
.calendar-event {
  border-left: 4px solid #1b365d;
  background: #ffffff;
  padding: 16px 18px;
}
.calendar-event time {
  min-width: 180px;
  color: #1b365d;
  font-weight: 800;
}
.calendar-event strong,
.calendar-event span {
  display: block;
}
.calendar-event div span {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.person-row {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding: 12px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.person-row:hover {
  border-color: #1b365d;
  background: #f3f5f6;
}
.person-row small {
  color: var(--muted);
}
.message-list {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 10px;
  min-height: 390px;
  max-height: 520px;
  overflow-y: auto;
  padding: 12px 0;
}
.message {
  width: fit-content;
  min-width: 0;
  justify-self: start;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 6px;
}
.message p {
  margin: 0 0 5px;
  white-space: pre-wrap;
}
.message small {
  color: var(--muted);
  font-size: var(--text-xs);
}
.message--incoming {
  background: #f3f5f6;
}
.message--outgoing {
  justify-self: end;
  background: #f3f5f6;
}
.avatar {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  margin-bottom: 16px;
  border: 3px solid #f3f5f6;
  border-radius: 50%;
  background: #1b365d center / cover no-repeat;
  color: #ffffff;
  font-size: 40px;
  font-weight: 800;
}
.provision-member {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.provision-member summary {
  color: #1b365d;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 800;
}
.provision-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.provision-form .button {
  grid-column: 1 / -1;
}

.mobile-nav {
  display: none;
  position: relative;
}
.mobile-nav summary {
  cursor: pointer;
  color: #1b365d;
  font-size: var(--text-sm);
  font-weight: 800;
  list-style: none;
}
.mobile-nav summary::-webkit-details-marker {
  display: none;
}
.mobile-nav summary::after {
  content: " ▾";
}
.mobile-nav[open] summary::after {
  content: " ▴";
}
.mobile-nav nav {
  position: absolute;
  z-index: 20;
  top: 34px;
  right: 0;
  display: grid;
  min-width: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px #10182024;
}
.mobile-nav a,
.mobile-nav button {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 12px 14px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: var(--text-sm);
  text-align: left;
  text-decoration: none;
}
.mobile-nav nav > :last-child {
  border-bottom: 0;
}
.group-card > summary,
.assignment-card > summary {
  cursor: pointer;
  list-style: none;
}
.group-card > summary::-webkit-details-marker,
.assignment-card > summary::-webkit-details-marker {
  display: none;
}
.group-card > summary::after,
.assignment-card > summary::after {
  content: "＋";
  align-self: center;
  color: var(--muted);
  font-size: var(--text-lg);
}
.group-card[open] > summary::after,
.assignment-card[open] > summary::after {
  content: "−";
}
.collapsible-card__body {
  padding-top: 4px;
}
.file-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: var(--text-xs);
}
.submission-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.submission-form label {
  display: grid;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 650;
}
.assignment-submit {
  margin-top: 20px;
}
.assignment-submit h2 {
  margin-top: 0;
}
.submission-result {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.group-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}
.group-profile p {
  margin: 0;
}
.group-avatar {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #1b365d center / cover no-repeat;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}
.group-editor,
.group-members {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.group-editor > summary,
.group-members > summary {
  cursor: pointer;
  color: #1b365d;
  font-size: var(--text-sm);
  font-weight: 800;
}
.edit-group-form,
.group-avatar-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.group-avatar-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.add-member-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 12px 0;
}
.member-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.member-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 6px;
  background: #f3f5f6;
  padding: 8px 10px;
}

input[type="file"] {
  cursor: pointer;
  background: #ffffff;
}
input[type="file"]::file-selector-button {
  margin: -10px 10px -10px -12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--primary-soft);
  padding: 11px 13px;
  color: var(--primary-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.channel-page {
  margin-top: 24px;
}
.channel-layout {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 14px;
  height: min(720px, calc(100vh - 120px));
  min-height: 560px;
}
.channel-sidebar {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 14px;
  overflow: hidden;
}
.channel-sidebar__heading {
  display: grid;
  gap: 12px;
}
.channel-sidebar__heading h1 {
  margin: 3px 0 0;
  font-size: var(--text-xl);
}
.channel-create {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.channel-create > summary {
  cursor: pointer;
  padding: 9px 11px;
  color: #1b365d;
  font-size: var(--text-sm);
  font-weight: 800;
}
.channel-create form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding: 8px;
}
.channel-create input,
.channel-create .button {
  min-height: 38px;
  padding: 7px 9px;
}
.channel-list {
  display: grid;
  align-content: start;
  gap: 6px;
  margin-top: 12px;
  overflow-y: auto;
}
.channel-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 6px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 10px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.channel-item span {
  color: var(--muted);
  font-size: var(--text-lg);
}
.channel-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel-item:hover {
  background: #f3f5f6;
}
.channel-item.is-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.channel-empty {
  padding: 8px;
}
.channel-chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.channel-chat__header {
  border-bottom: 1px solid var(--line);
  padding: 15px 18px;
}
.channel-chat__header h2 {
  margin: 3px 0 0;
  font-size: var(--text-lg);
}
.channel-message-list {
  align-content: start;
  min-height: 0;
  max-height: none;
  padding: 18px;
}
.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px;
}
.chat-composer textarea {
  min-height: 42px;
  max-height: 130px;
  resize: vertical;
}

@media (max-width: 760px) {
  .social-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .people-panel,
  .conversation-panel {
    min-height: auto;
  }
  .provision-form {
    grid-template-columns: 1fr;
  }
  .student-card,
  .calendar-event {
    align-items: flex-start;
    flex-direction: column;
  }
  .student-card dl {
    width: 100%;
  }
  .table-filter {
    max-width: none;
    margin-top: 10px;
  }
  .group-avatar-form,
  .add-member-form {
    grid-template-columns: 1fr;
  }

  .channel-page {
    margin-top: 12px;
  }
  .channel-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }
  .channel-sidebar {
    max-height: 270px;
  }
  .channel-list {
    grid-auto-columns: minmax(150px, 70%);
    grid-auto-flow: column;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
  }
  .channel-chat {
    min-height: 500px;
  }
  .channel-message-list {
    min-height: 360px;
  }
  .chat-composer {
    grid-template-columns: 1fr;
  }

  body {
    display: grid;
    justify-items: center;
  }
  .dashboard-shell {
    width: calc(100% - 20px);
    max-width: 480px;
    margin: 0 auto;
    padding: 10px 0 20px;
  }
  .desktop-nav > a,
  .desktop-nav > button,
  .desktop-nav > .sync-state,
  .desktop-nav > .muted {
    display: none;
  }
  .desktop-nav {
    width: auto;
  }
  .mobile-nav {
    display: block;
  }
  .group-card,
  .assignment-card {
    width: 100%;
    padding: 14px;
  }
  .group-card:not([open]),
  .assignment-card:not([open]) {
    box-shadow: none;
  }
  .group-card__top,
  .assignment-card__top {
    align-items: center;
  }
  .group-card__top h3,
  .assignment-card__top h3 {
    font-size: var(--text-base);
  }
  .group-card__top .pill,
  .assignment-card__top .pill {
    margin-left: auto;
  }
  .collapsible-card__body {
    padding-top: 10px;
  }
}

input:focus,
textarea:focus,
select:focus {
  border-color: #1b365d;
  box-shadow: 0 0 0 3px #f3f5f6;
}

.checkbox input {
  accent-color: #1b365d;
}

.status-published,
.status-reviewed {
  background: #f3f5f6;
  color: #1b365d;
}

.status-submitted {
  background: #f3f5f6;
  color: #101820;
}

.status-late {
  background: #f3f5f6;
  color: #7f3035;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .topbar__right {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .sync-state {
    font-size: var(--text-xs);
  }

  .hero h1 {
    font-size: var(--heading-sm);
  }

  .shell {
    padding: 12px;
  }
  .topbar {
    height: auto;
    min-height: 56px;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
  }
  .topbar__right {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .topbar__right.desktop-nav {
    display: block;
    width: auto;
    margin-left: auto;
  }
  .mobile-nav {
    flex: 0 0 auto;
    margin-top: 10px;
  }
  .topbar__right .button {
    min-height: 40px;
    padding: 7px 5px;
    overflow-wrap: anywhere;
    font-size: var(--text-xs);
    text-align: center;
  }
  .topbar__right .notifications {
    min-width: 0;
    padding: 9px 2px;
    text-align: center;
  }
  .topbar__right .notifications summary {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hero {
    margin: 12px 0 20px;
    min-height: 0;
    padding: 22px 18px;
    align-items: flex-start;
  }
  .hero__metric {
    width: 100%;
    min-width: 0;
  }
  .card {
    padding: 16px;
  }
  .assignment-actions,
  .chat-bind,
  .upload-form {
    align-items: stretch;
  }
  .assignment-actions .button,
  .assignment-actions a {
    flex: 1 1 130px;
    text-align: center;
  }
}

.max-login {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: var(--text-xs);
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

/* Кабинет преподавателя 1.4 */
.dashboard-page {
  display: grid;
  min-height: 100vh;
}
.dashboard-page::after {
  display: none;
}
.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  background:
    radial-gradient(circle at 90% 40%, #1b365d 0, transparent 35%),
    linear-gradient(155deg, #101820, #101820);
  padding: 14px 8px;
  color: #e4e9ec;
}
.sidebar-brand {
  padding: 0 11px 18px;
  color: #ffffff;
}
.sidebar-brand .brand__mark {
  width: 49px;
  height: 49px;
  border-radius: 12px;
  background: linear-gradient(135deg, #536777, #a2acab);
  font-size: var(--text-lg);
}
.sidebar-brand small {
  color: #a2acab;
}
.sidebar-nav {
  display: grid;
}
.sidebar-nav a {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-height: 40px;
  border-radius: 7px;
  padding: 0 16px;
  color: #a2acab;
  font-size: var(--text-sm);
  text-decoration: none;
}
.sidebar-nav a span {
  color: #a2acab;
  font-size: inherit;
}
.sidebar-nav a svg {
  width: 19px;
  height: 19px;
  color: #a2acab;
}
.sidebar-nav a:hover,
.sidebar-nav a.is-active {
  background: linear-gradient(90deg, #1b365d, #0072ce);
  color: #ffffff;
}
.sidebar-bottom {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding: 8px;
}
.max-status-card,
.help-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #1b365d;
  border-radius: 9px;
  padding: 11px;
  color: #f3f5f6;
  text-decoration: none;
}
.max-status-card strong,
.help-card strong {
  display: block;
  font-size: var(--text-xs);
}
.max-status-card small,
.help-card small {
  display: block;
  color: #536777;
  font-size: var(--text-xs);
}
.max-status-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, #536777, #536777);
  color: #ffffff;
}
.help-card > span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #536777;
  border-radius: 50%;
}
.help-card b {
  margin-left: auto;
}
.sidebar-version {
  display: grid;
  gap: 2px;
  padding: 80px 4px 0;
  font-size: var(--text-xs);
}
.sidebar-version small {
  color: #536777;
}
.sidebar-version span {
  margin-top: 8px;
  color: #a2acab;
  font-size: var(--text-xs);
}
.sidebar-version b {
  color: #ff4e67;
}

.app-workspace {
  min-width: 0;
}
.workspace-topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  height: 62px;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #f3f5f6;
  background: rgba(27, 54, 93, 0.96);
  padding: 8px 20px;
  backdrop-filter: blur(12px);
}
.dashboard-search {
  position: relative;
  width: min(680px, 55vw);
}
.dashboard-search span {
  position: absolute;
  top: 5px;
  left: 11px;
  color: #536777;
  font-size: 25px;
}
.dashboard-search input {
  height: 34px;
  border-color: #e4e9ec;
  border-radius: 6px;
  background: #ffffff;
  padding: 7px 12px 7px 35px;
  font-size: var(--text-xs);
}
.workspace-user {
  display: flex;
  align-items: center;
  margin-left: auto;
}
.workspace-user > div strong,
.workspace-user > div small {
  display: block;
  white-space: nowrap;
}
.workspace-user > div strong {
  font-size: var(--text-xs);
}
.workspace-user > div small {
  color: #536777;
  font-size: var(--text-xs);
}
.user-avatar {
  display: grid !important;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #1b365d center / cover no-repeat;
  color: #ffffff;
}

.global-search {
  position: relative;
  display: flex;
  width: min(620px, 54vw);
  align-items: center;
}
.global-search > svg {
  position: absolute;
  z-index: 1;
  left: 12px;
  width: 17px;
  color: #536777;
}
.global-search input {
  width: 100%;
  margin: 0;
  border: 1px solid #f3f5f6;
  border-radius: 8px;
  padding: 0 12px 0 40px;
  font-size: var(--text-xs);
}
.global-search-results {
  position: absolute;
  z-index: 50;
  top: calc(100% + 7px);
  left: 0;
  display: grid;
  width: min(620px, 82vw);
  max-height: 430px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(27, 54, 93, 0.16);
}
.global-search-results a {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid #f3f5f6;
  padding: 11px 13px;
  color: var(--text);
  text-decoration: none;
}
.global-search-results a:hover {
  background: var(--primary-soft);
}
.global-search-results strong {
  font-size: var(--text-xs);
}
.global-search-results small {
  overflow: hidden;
  color: var(--text-soft);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-search-results p {
  margin: 0;
  padding: 16px;
  color: var(--text-soft);
  font-size: var(--text-xs);
}
.logout-link {
  border: 0;
  background: transparent;
  color: #536777;
  cursor: pointer;
  font-size: var(--text-xs);
}

.dashboard-content {
  display: grid;
}
.dashboard-main {
  min-width: 0;
}
.dashboard-hero {
  position: relative;
  min-height: 230px;
  margin: 0 0 12px;
  overflow: hidden;
  border-radius: 9px;
  background:
    radial-gradient(circle at 70% 20%, #0072ce 0, transparent 30%),
    radial-gradient(circle at 100% 0%, #0072ce 0, transparent 38%),
    linear-gradient(120deg, #101820, #1b365d);
  padding: 36px 32px;
}
.dashboard-hero::after {
  content: "";
  position: absolute;
}
.dashboard-hero h1 {
  margin: 6px 0 17px;
  font-size: clamp(34px, 3.2vw, 46px);
  letter-spacing: -0.025em;
}
.dashboard-hero h1 em {
  font-style: normal;
}
.dashboard-hero p {
  font-size: var(--text-sm);
}
.hero-art {
  position: absolute;
  top: 74px;
  right: 250px;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: rotate(-5deg);
}
.hero-art span {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #f3f5f6);
  box-shadow: 0 17px 26px #10182066;
  color: #536777;
  font-size: 26px;
  font-weight: 900;
}
.hero-art span:last-child {
  background: linear-gradient(145deg, #536777, #536777);
  color: #ffffff;
}
.hero-art > svg {
  width: 28px;
  color: #e4e9ec;
}
.hero-art span svg {
  width: 32px;
  height: 32px;
}
.hero-features {
  position: relative;
  z-index: 1;
  display: grid;
  align-self: stretch;
  gap: 0;
  min-width: 190px;
  margin: -14px -15px -14px 0;
  padding: 16px;
  border-radius: 10px;
  background: #1b365dbf;
  list-style: none;
  font-size: var(--text-xs);
}
.hero-features li {
  display: flex;
  align-items: center;
  color: #e4e9ec;
}
.hero-features li svg {
  width: 15px;
  height: 15px;
  margin-right: 9px;
  color: #a2acab;
}

.dashboard-metrics {
  display: grid;
}
.dashboard-metrics > * {
  display: grid;
  grid-template-columns: 42px auto 1fr auto;
  align-items: center;
  min-height: 68px;
  border: 1px solid #f3f5f6;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 14px;
  color: inherit;
  text-decoration: none;
}
.dashboard-metrics small {
  align-self: end;
  margin: 0 0 7px 5px;
  color: #536777;
}
.dashboard-metrics b {
  color: #536777;
  font-size: var(--text-lg);
}
.metric-icon {
  display: grid;
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #ffffff;
  color: #536777;
  font-size: var(--text-lg);
}
.metric-icon svg {
  width: 19px;
}
.metric-icon--green {
  background: #f3f5f6;
  color: #536777;
}

.dashboard-forms {
  gap: 10px;
}
.creation-collapsible {
  margin-top: 10px;
}
.creation-collapsible > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  padding: 13px 16px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  box-shadow: var(--shadow);
}
.creation-collapsible > summary::-webkit-details-marker {
  display: none;
}
.creation-collapsible > summary span {
  display: flex;
  align-items: center;
  gap: 9px;
}
.creation-collapsible > summary svg {
  width: 18px;
  color: var(--primary);
}
.creation-collapsible > summary small {
  color: var(--text-soft);
}
.creation-collapsible[open] > summary {
  margin-bottom: 10px;
}
.dashboard-page .card {
  border-color: #f3f5f6;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(27, 54, 93, 0.035);
}
.dashboard-page .form-card .section-heading {
  margin-bottom: 8px;
}
.dashboard-page .form-card h2 {
  font-size: var(--text-lg);
}
.dashboard-page .form-card .eyebrow {
  width: max-content;
  border-radius: 4px;
  padding: 3px 9px;
}
.dashboard-page .form-card label {
  margin-top: 10px;
}
.dashboard-page input,
.dashboard-page textarea,
.dashboard-page select {
  border-color: #e4e9ec;
  border-radius: 5px;
  padding: 8px 9px;
  font-size: var(--text-xs);
}
.dashboard-page .button {
  border-radius: 5px;
}
.dashboard-page .button--primary {
  background: linear-gradient(90deg, #536777, #536777);
}
.dashboard-page #groupForm .button--primary {
  width: 100%;
}
.dashboard-page #assignmentForm {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  column-gap: 18px;
}
.dashboard-page #assignmentForm .section-heading {
  grid-column: 1 / -1;
}
.dashboard-page #assignmentForm > label:not(.assignment-file),
.dashboard-page #assignmentForm > textarea {
  grid-column: 1;
}
.dashboard-page #assignmentForm .assignment-file {
  grid-column: 2;
  grid-row: 2 / span 3;
}
.dashboard-page #assignmentForm .form-row {
  grid-column: 2;
  grid-row: 5;
  grid-template-columns: 1fr;
  gap: 4px;
}
.dashboard-page #assignmentForm > .button {
  grid-column: 2;
  justify-self: end;
  margin-top: 8px;
}
.file-drop {
  position: relative;
  display: grid;
  min-height: 94px;
  place-items: center;
  border: 1px dashed #a2acab;
  border-radius: 6px;
  color: #0072ce;
  text-align: center;
}
.file-drop > b {
  color: #536777;
  font-size: 25px;
}
.file-drop > span {
  margin-top: -12px;
  font-size: var(--text-xs);
}
.file-drop small {
  display: block;
  color: #536777;
}
.file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dashboard-groups {
  border-radius: 8px;
}

.dashboard-aside {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  display: grid;
  align-content: start;
  padding-top: 0;
}
.dashboard-aside header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dashboard-aside header a,
.mini-calendar > a {
  color: #536777;
  font-size: var(--text-xs);
  text-decoration: none;
}
.mini-calendar header strong {
  font-size: 17px;
}
.week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin: 14px 0;
}
.week-days span {
  display: grid;
  min-height: 39px;
  place-items: center;
  border-radius: 7px;
  color: #536777;
  font-size: var(--text-xs);
  text-align: center;
}
.week-days span b {
  display: block;
  font-size: var(--text-xs);
}
.week-days span.is-today {
  color: #ffffff;
}
.deadline-preview {
  grid-template-columns: minmax(0, 1fr);
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}
.deadline-item {
  min-width: 0;
  border-left: 3px solid #536777;
  border-radius: 5px;
  background: #ffffff;
  padding: 8px 9px;
}
.deadline-item strong,
.deadline-item small {
  display: block;
}
.deadline-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-xs);
}
.deadline-item small {
  color: #536777;
  font-size: var(--text-xs);
}
.aside-notifications > a {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #f3f5f6;
  padding: 10px 0;
  color: inherit;
  text-decoration: none;
}
.aside-notifications > a > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #f3f5f6;
  color: #536777;
}
.aside-notifications > a > span svg {
  width: 16px;
}
.aside-notifications > a > svg {
  width: 13px;
  color: #536777;
}
.button svg {
  width: 14px;
  height: 14px;
}
.profile-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}
.student-max-id {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: var(--text-xs);
}
.student-role {
  min-width: 150px;
  color: var(--text-soft);
  font-size: var(--text-xs);
}
.student-role select {
  margin-top: 4px;
}
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.help-grid .card {
  position: relative;
  padding: 20px;
}
.help-grid .card > svg {
  width: 25px;
  height: 25px;
  color: var(--primary);
}
.help-grid h2 {
  margin: 12px 0 7px;
  font-size: var(--text-base);
}
.help-grid p {
  margin: 0;
  color: var(--text-soft);
  font-size: var(--text-xs);
  line-height: 1.65;
}
.aside-notifications strong,
.aside-notifications small {
  display: block;
}
.aside-notifications strong {
  font-size: var(--text-xs);
}
.aside-notifications small {
  color: #536777;
  font-size: var(--text-xs);
}
.aside-tasks {
  min-height: 245px;
}
.aside-empty {
  display: grid;
  place-items: center;
  padding: 35px 15px;
  color: #536777;
  text-align: center;
}
.aside-empty span {
  font-size: 48px;
}
.aside-empty p {
  margin: 4px 0;
  font-size: var(--text-xs);
}
.aside-empty small {
  max-width: 190px;
  font-size: var(--text-xs);
}
.quick-assignment {
  display: block;
  border-top: 1px solid #f3f5f6;
  padding: 10px 2px;
  color: inherit;
  text-decoration: none;
}
.quick-assignment strong,
.quick-assignment small {
  display: block;
}
.quick-assignment strong {
  font-size: var(--text-xs);
}
.quick-assignment small {
  color: #536777;
  font-size: var(--text-xs);
}

@media (max-width: 1180px) {
  .dashboard-page {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .dashboard-content {
    grid-template-columns: minmax(600px, 1fr) 270px;
  }
  .hero-art {
    display: none;
  }
  .dashboard-groups .grid--groups {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-page {
    display: block;
  }
  .app-sidebar {
    display: none;
  }
  .workspace-topbar {
    padding: 8px 12px;
  }
  .workspace-user > .sync-state,
  .workspace-user > .user-avatar,
  .workspace-user > div,
  .workspace-user > .logout-link {
    display: none !important;
  }
  .workspace-topbar .mobile-nav {
    display: block;
    margin: 0;
  }
  .dashboard-content {
    display: block;
    padding: 12px;
  }
  .dashboard-aside {
    grid-template-columns: 1fr 1fr;
    margin-top: 12px;
  }
  .aside-tasks {
    grid-column: 1 / -1;
    min-height: 0;
  }
}

@media (max-width: 700px) {
  .dashboard-page {
    justify-items: stretch;
  }
  .dashboard-search {
    width: 100%;
  }
  .dashboard-hero {
    min-height: 0;
    padding: 24px 20px;
  }
  .dashboard-hero h1 {
    font-size: var(--heading-sm);
  }
  .dashboard-hero br {
    display: none;
  }
  .hero-features {
    display: none;
  }
  .dashboard-metrics {
    grid-template-columns: 1fr;
  }
  .dashboard-forms {
    grid-template-columns: 1fr;
  }
  .dashboard-page #assignmentForm {
    display: block;
  }
  .dashboard-page #assignmentForm .assignment-file {
    display: grid;
  }
  .dashboard-groups .grid--groups {
    grid-template-columns: 1fr;
  }
  .dashboard-aside {
    grid-template-columns: 1fr;
  }
  .aside-tasks {
    grid-column: auto;
  }
}

/* Общая оболочка внутренних страниц */
.unified-page {
  background: var(--bg);
  font-family: var(--font-ui);
}
.unified-page::after {
  display: none;
}
.unified-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 230px;
  flex-direction: column;
  background:
    radial-gradient(circle at 15% 0%, rgba(27, 54, 93, 0.13), transparent 35%),
    linear-gradient(180deg, #101820, #101820);
  padding: 18px 10px;
  color: #f3f5f6;
}
.unified-sidebar .brand {
  padding: 0 8px 20px;
  color: #ffffff;
}
.unified-sidebar .brand-logo {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #a2acab, #536777);
  box-shadow: 0 10px 24px rgba(27, 54, 93, 0.35);
  font-size: 19px;
  font-weight: 800;
}
.unified-sidebar .brand-title,
.unified-sidebar .brand-subtitle {
  display: block;
}
.unified-sidebar .brand-title {
  font-size: 17px;
}
.unified-sidebar .brand-subtitle {
  margin-top: 4px;
  color: #a2acab;
  font-size: var(--text-xs);
}
.unified-sidebar .sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.unified-sidebar .nav-item {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 0 14px;
  color: #a2acab;
  font-size: var(--text-sm);
  text-decoration: none;
}
.unified-sidebar .nav-item svg {
  width: 19px;
}
.unified-sidebar .nav-item:hover,
.unified-sidebar .nav-item.active {
  background: linear-gradient(
    90deg,
    rgba(27, 54, 93, 0.65),
    rgba(27, 54, 93, 0.75)
  );
  color: #ffffff;
}
.unified-sidebar .sidebar-bottom {
  display: block;
  margin-top: auto;
}
.unified-sidebar .max-status-card,
.unified-sidebar .help-card {
  margin-top: 8px;
  background: rgba(27, 54, 93, 0.025);
}
.unified-sidebar .max-logo {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #a2acab, #536777);
}
.unified-sidebar .max-logo svg {
  width: 18px;
}
.unified-sidebar .max-status-text {
  min-width: 0;
}
.unified-sidebar .online-dot {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #536777;
  box-shadow: 0 0 10px rgba(27, 54, 93, 0.7);
}
.unified-sidebar .sidebar-footer {
  padding: 30px 10px 5px;
}
.unified-sidebar .footer-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--text-xs);
}
.unified-sidebar .footer-logo span {
  font-size: var(--text-lg);
  font-weight: 900;
}
.unified-sidebar .version,
.unified-sidebar .made-for {
  margin-top: 5px;
  color: #536777;
  font-size: var(--text-xs);
}
.unified-main > .shell {
  width: 100%;
  max-width: none;
  padding: 0 22px 30px;
}
.unified-main > .shell > .topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  height: 64px;
  margin: 0 -22px;
  border-bottom: 1px solid var(--border);
  background: rgba(27, 54, 93, 0.94);
  padding: 10px 22px;
  backdrop-filter: blur(12px);
}
.unified-main .section {
  margin-top: 16px;
}
.unified-main .card {
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow:
    0 4px 15px rgba(27, 54, 93, 0.04),
    0 1px 3px rgba(27, 54, 93, 0.04);
}

@media (max-width: 1050px) {
  .unified-sidebar {
    width: 78px;
  }
  .unified-main {
    width: calc(100% - 78px);
    margin-left: 78px;
  }
  .unified-sidebar .brand {
    justify-content: center;
    padding-inline: 0;
  }
  .unified-sidebar .brand > span:last-child,
  .unified-sidebar .nav-item span,
  .unified-sidebar .max-status-text,
  .unified-sidebar .help-card div,
  .unified-sidebar .help-arrow,
  .unified-sidebar .sidebar-footer {
    display: none;
  }
  .unified-sidebar .nav-item {
    justify-content: center;
    padding: 0;
  }
}

@media (max-width: 560px) {
  .unified-sidebar {
    display: none;
  }
  .unified-main {
    width: 100%;
    margin-left: 0;
  }
  .unified-main > .shell {
    padding-inline: 12px;
  }
  .global-search {
    width: 100%;
  }
  .help-grid {
    grid-template-columns: 1fr;
  }
}

body::after {
  content: "Поток+ · версия 1.7.0";
  display: block;
  padding: 16px 12px 22px;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.4;
  text-align: center;
}

/* Поток+ / warm paper, forest, chartreuse. Shared visual system. */
[hidden] {
  display: none !important;
}
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
a,
button,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
a,
button,
summary {
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
}
button:active,
.button:active {
  transform: translateY(1px);
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #536777;
  outline-offset: 4px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid #e4e9ec;
  border-color: #536777;
}
input,
select,
textarea,
.dashboard-page input,
.dashboard-page select,
.dashboard-page textarea {
  border-color: var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: var(--text-sm);
  background: #ffffff;
}
h1,
h2,
h3 {
  letter-spacing: -0.035em;
}
.button,
.dashboard-page .button {
  min-height: 42px;
  border-radius: 10px;
  gap: 8px;
  font-size: var(--text-sm);
}
.button--primary,
.dashboard-page .button--primary {
  background: var(--brand-blue);
  color: #ffffff;
}
.button--primary:hover,
.dashboard-page .button--primary:hover {
  background: var(--brand-navy);
  box-shadow: 0 4px 14px #1b365d20;
}
.button--quiet {
  background: #ffffff;
  border-color: #e4e9ec;
  color: #1b365d;
}
.brand__mark,
.sidebar-brand .brand__mark,
.unified-sidebar .brand-logo {
  background: var(--brand-blue);
  color: #1b365d;
  box-shadow: none;
  border-radius: 13px;
}
.card,
.dashboard-page .card,
.unified-main .card {
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: var(--shadow);
  padding: 24px;
}
.empty {
  border: 1px dashed #e4e9ec;
  background: #f3f5f6;
  border-radius: 13px;
  padding: 35px 20px;
  color: #536777;
}
.pill {
  background: #f3f5f6;
  color: #0072ce;
}
.materials,
.invite {
  background: #f3f5f6;
}
.notice,
.toast {
  background: var(--brand-navy);
}
.sync-state,
.sync-state::before {
  color: #0072ce;
}
.sync-state::before {
  background: #0072ce;
}
/* Authentication */
.entry-header {
  height: 110px;
  max-width: 1440px;
  padding: 0 64px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.entry-header .brand {
  gap: 13px;
}
.entry-header .brand strong {
  font-size: var(--heading-sm);
  letter-spacing: -1.7px;
}
.entry-header .brand__mark {
  font-size: var(--heading-sm);
  width: 43px;
  height: 43px;
  line-height: 1;
  letter-spacing: -3px;
}
.brand-plus {
  color: #0072ce;
}
.entry-header nav {
  display: flex;
  gap: 36px;
  font-size: var(--text-sm);
}
.entry-header nav a,
.entry-footer a {
  color: var(--ink);
  text-decoration: none;
}
.entry-header nav a:hover,
.entry-footer a:hover {
  color: #536777;
}
.entry-layout {
  max-width: 1312px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.13fr 1fr;
  min-height: 720px;
}
.entry-story {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 22px;
  background: var(--brand-navy);
  padding: 49px 48px 29px;
  color: var(--brand-white);
  display: flex;
  flex-direction: column;
}
.entry-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 1.8px;
  color: #e4e9ec;
}
.entry-kicker > span {
  width: 7px;
  height: 7px;
  background: #a2acab;
  border-radius: 50%;
  box-shadow: 0 0 0 5px #a2acab10;
}
.entry-story h1 {
  position: relative;
  z-index: 2;
  font-size: clamp(62px, 6.1vw, 88px);
  line-height: 0.99;
  font-weight: 500;
  letter-spacing: -5px;
  margin: 38px 0 27px;
}
.entry-story h1 em {
  font-style: normal;
  color: var(--brand-white);
}
.entry-story > p {
  font-size: var(--text-sm);
  line-height: 1.8;
  color: #e4e9ec;
  margin: 0;
}
.story-bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #ffffff26;
  padding-top: 22px;
  font-size: var(--text-xs);
  letter-spacing: 1px;
  color: #a2acab;
}
.flow-sculpture {
  position: absolute;
  z-index: -1;
  right: -150px;
  top: 110px;
  width: 470px;
  height: 470px;
  transform: rotate(-28deg);
  animation: flow-drift 18s ease-in-out infinite alternate;
}
.flow-sculpture i {
  position: absolute;
  inset: 0;
  border: 1px solid #a2acab60;
  border-radius: 44%;
  transform: rotate(0deg);
}
.flow-sculpture i:nth-child(2) {
  inset: 22px;
  transform: rotate(12deg);
}
.flow-sculpture i:nth-child(3) {
  inset: 44px;
  transform: rotate(24deg);
}
.flow-sculpture i:nth-child(4) {
  inset: 66px;
  transform: rotate(36deg);
}
.flow-sculpture i:nth-child(5) {
  inset: 88px;
  transform: rotate(48deg);
}
.flow-sculpture i:nth-child(6) {
  inset: 110px;
  transform: rotate(60deg);
}
.flow-sculpture > span {
  position: absolute;
  left: 205px;
  top: 165px;
  color: #a2acab70;
  font-size: 110px;
  font-weight: 200;
}
.entry-access {
  padding: 76px 72px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.access-intro .eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 1.7px;
  color: #536777;
}
.access-intro h2 {
  font-size: var(--heading-lg);
  font-weight: 500;
  line-height: 1.1;
  margin: 20px 0 12px;
  letter-spacing: -1.5px;
}
.access-intro h2 > span {
  color: #536777;
}
.access-intro > p {
  font-size: var(--text-xs);
  color: #536777;
  margin: 0 0 27px;
}
.entry-access .login-card {
  width: 100%;
  border: 0;
  background: none;
  box-shadow: none;
  display: grid;
  gap: 16px;
  padding: 0;
}
.login-card label {
  display: grid;
  gap: 9px;
  font-size: var(--text-xs);
  font-weight: 600;
}
.entry-access input {
  height: 49px;
  background: #ffffff;
  border: 1px solid #e4e9ec;
  border-radius: 9px;
  font-size: var(--text-xs);
}
.entry-access .max-login {
  margin: 0;
  background: #e4e9ec;
  border: 1px solid #e4e9ec;
  color: #1b365d;
  justify-content: space-between;
  min-height: 49px;
  font-size: var(--text-xs);
}
.max-symbol {
  font-size: var(--text-xl);
  font-weight: 800;
}
.entry-access .login-divider {
  margin: 2px 0;
  color: #536777;
  font-size: var(--text-xs);
}
.password-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.password-label a {
  font-size: var(--text-xs);
  font-weight: 400;
  color: #536777;
  text-decoration: none;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 47px;
}
.password-toggle {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: #536777;
  cursor: pointer;
}
.entry-access .button--primary {
  justify-content: space-between;
  padding: 0 18px;
  min-height: 49px;
  font-size: var(--text-xs);
  margin: 4px 0 0;
}
.entry-access .login-switch {
  font-size: var(--text-xs);
  line-height: 1.7;
}
.entry-access .signup-switch {
  font-size: var(--text-xs);
  margin-top: 6px;
}
.access-note {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 40px;
  padding-top: 23px;
  border-top: 1px solid #e4e9ec;
}
.access-note > span {
  font-size: 40px;
  color: #536777;
}
.access-note p {
  font-size: var(--text-xs);
  line-height: 1.8;
  color: #536777;
}
.access-note strong {
  font-weight: 500;
  color: #0072ce;
}
.entry-footer {
  max-width: 1440px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 29px 64px;
  color: #536777;
  font-size: var(--text-xs);
}
.login-view:not(.entry-access) {
  min-height: 90vh;
}
.login-view:not(.entry-access) .login-card {
  padding: 32px;
  width: min(440px, calc(100vw - 30px));
  border-top: 0;
}
.login-card h2 {
  font-size: var(--heading-sm);
}
.login-card .button {
  width: 100%;
}
.login-view:not(.entry-access) label {
  margin-top: 18px;
}
.login-view:not(.entry-access) .login-switch {
  margin-top: 20px;
}
/* Workspace */
.dashboard-page {
  grid-template-columns: 234px minmax(0, 1fr);
  background: var(--bg);
  color: var(--ink);
}
.app-sidebar,
.unified-sidebar {
  background: var(--brand-navy);
  color: #e4e9ec;
  padding: 30px 14px;
  width: 234px;
}
.sidebar-brand,
.unified-sidebar .brand {
  padding: 0 10px 38px;
}
.sidebar-brand small,
.unified-sidebar .brand-subtitle {
  color: #a2acab;
  font-size: var(--text-xs);
}
.sidebar-nav {
  gap: 7px;
}
.sidebar-nav a,
.unified-sidebar .nav-item {
  min-height: 46px;
  color: #a2acab;
  font-size: var(--text-sm);
  border-radius: 10px;
  padding: 0 14px;
  gap: 8px;
}
.sidebar-nav a svg,
.sidebar-nav a span {
  color: inherit;
}
.sidebar-nav a:hover,
.sidebar-nav a.is-active,
.unified-sidebar .nav-item:hover,
.unified-sidebar .nav-item.active {
  background: var(--brand-white);
  color: #1b365d;
}
.unified-sidebar .nav-item span {
  font-size: var(--text-sm);
}
.help-card,
.unified-sidebar .help-card {
  border-color: #ffffff20;
  background: #ffffff06;
  color: #e4e9ec;
}
.help-card small,
.help-card span {
  color: #a2acab;
}
.sidebar-version {
  padding-top: 32px;
}
.sidebar-version small,
.sidebar-version span,
.unified-sidebar .version,
.unified-sidebar .made-for {
  color: #536777;
}
.unified-sidebar .footer-logo span {
  color: var(--brand-white);
}
.workspace-topbar,
.unified-main > .shell > .topbar {
  height: 82px;
  background: #f3f5f6f0;
  border-color: var(--border);
  padding: 16px 30px;
}
.global-search input {
  background: #f3f5f6;
  border-color: transparent;
  height: 42px;
}
.workspace-user {
  gap: 12px;
}
.user-avatar,
.avatar {
  background-color: #e4e9ec;
  color: #1b365d;
}
.dashboard-content {
  grid-template-columns: minmax(0, 1fr) 280px;
  padding: 28px 30px;
  gap: 24px;
  max-width: 1700px;
  margin: 0 auto;
}
.dashboard-hero,
.hero {
  border-radius: 20px;
  min-height: 285px;
  background: var(--brand-navy);
  padding: 36px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.dashboard-hero h1,
.hero h1 {
  font-size: clamp(35px, 3.5vw, 52px);
  font-weight: 500;
  letter-spacing: -2px;
  line-height: 1.06;
}
.dashboard-hero h1 em {
  color: var(--brand-white);
}
.hero .eyebrow {
  color: #a2acab;
  letter-spacing: 1.8px;
  font-size: var(--text-xs);
}
.hero p {
  color: #e4e9ec;
  font-size: var(--text-sm);
  line-height: 1.7;
}
.hero-features,
.hero-art {
  display: none;
}
.dashboard-hero::after {
  width: 340px;
  height: 340px;
  inset: -100px -100px auto auto;
  border: 1px solid #a2acab60;
  border-radius: 44%;
  box-shadow:
    0 0 0 24px #0072ce18,
    0 0 0 48px #0072ce18,
    0 0 0 72px #0072ce18;
  animation: flow-drift 20s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero > div {
  position: relative;
  z-index: 1;
}
.dashboard-metrics {
  gap: 14px;
  margin-bottom: 24px;
  grid-template-columns: 1fr 1.2fr 1fr;
}
.dashboard-metrics > * {
  border-color: var(--border);
  border-radius: 14px;
  padding: 16px 12px;
  min-height: 91px;
  grid-template-columns: 42px auto 1fr;
}
.dashboard-metrics > * > svg {
  display: none;
}
.dashboard-metrics strong {
  font-size: var(--heading-sm);
  font-weight: 500;
}
.dashboard-metrics small {
  font-size: var(--text-xs);
  margin-left: 5px;
}
.metric-icon,
.metric-icon--green {
  background: #f3f5f6;
  color: #0072ce;
}
.creation-collapsible > summary {
  border-color: var(--border);
  background: #f3f5f6;
  padding: 17px 20px;
  border-radius: 12px;
  box-shadow: none;
}
.creation-collapsible > summary small {
  font-size: var(--text-xs);
}
.dashboard-forms {
  grid-template-columns: 1fr;
  margin-top: 16px;
}
.dashboard-page .form-card {
  padding: 24px;
}
.dashboard-page .form-card label {
  font-size: var(--text-xs);
}
.dashboard-page .form-card .eyebrow {
  background: #f3f5f6;
  color: #0072ce;
}
.dashboard-groups {
  background: none;
  border: 0;
  padding: 0;
  margin-top: 32px;
}
.dashboard-groups .section-heading {
  margin-bottom: 18px;
}
.dashboard-groups .section-heading h2 {
  font-size: var(--text-xl);
}
.dashboard-groups .grid--groups {
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 16px;
}
.dashboard-groups .group-card {
  padding: 23px;
}
.group-card:hover,
.assignment-card:hover {
  border-color: #a2acab;
  box-shadow: 0 8px 24px #1b365d08;
  transform: translateY(-2px);
}
.section-heading > .muted {
  font-size: var(--text-xs);
  max-width: 250px;
}
.dashboard-aside {
  gap: 20px;
}
.dashboard-aside .card {
  min-width: 0;
  padding: 21px;
}
.dashboard-aside header strong {
  font-size: var(--text-sm);
}
.week-days span.is-today {
  background: var(--brand-blue);
}
.aside-notifications > a > span {
  background: #f3f5f6;
  color: #0072ce;
}
.aside-notifications strong,
.quick-assignment strong {
  font-size: var(--text-xs);
}
.aside-notifications small,
.quick-assignment small,
.deadline-item small {
  font-size: var(--text-xs);
}
.aside-notifications > a {
  padding: 15px 0;
}
.aside-empty span {
  color: #a2acab;
}
.section-page-heading {
  padding: 15px 0 30px;
}
.section-page-heading > a {
  font-size: var(--text-xs);
  color: #536777;
  text-decoration: none;
}
.section-page-heading .eyebrow {
  margin-top: 30px;
}
.section-page-heading h1 {
  font-size: 48px;
  font-weight: 500;
  margin: 8px 0;
}
.section-page-heading h1 span {
  color: #536777;
}
.section-page-heading p {
  color: var(--muted);
  font-size: var(--text-sm);
}
.section-page .dashboard-metrics {
  display: none;
}
.groups-page #assignments-section,
.assignments-page #groups-section {
  display: none;
}
.groups-page #assignmentForm,
.assignments-page #groupForm {
  display: none;
}
.section-page .dashboard-forms {
  grid-template-columns: 1fr;
}
.unified-main {
  margin-left: 234px;
  width: calc(100% - 234px);
}
.unified-main > .shell {
  padding: 0 32px 32px;
}
.unified-main > .shell > .topbar {
  margin: 0 -32px;
}
.settings-grid,
.social-layout {
  gap: 24px;
  margin-top: 30px;
}
.unified-main .hero {
  margin-top: 28px;
}
.section-page .dashboard-aside {
  padding-top: 30px;
}
.bottom-nav {
  display: none;
}
.section-heading h2 {
  font-size: var(--text-xl);
}
.dashboard-main,
.unified-main > .shell {
  animation: none;
}
.assignment-actions {
  flex-wrap: wrap;
}
.login-error {
  color: #aa3830;
}
.page-heading {
  padding: 32px 0 0;
}
.page-heading h1 {
  font-size: var(--heading-lg);
  font-weight: 500;
  margin: 6px 0;
}
.page-heading p {
  font-size: var(--text-sm);
  color: var(--muted);
}
@keyframes flow-drift {
  from {
    transform: rotate(-28deg) translateY(0);
  }
  to {
    transform: rotate(4deg) translateY(15px);
  }
}
@keyframes content-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@view-transition {
  navigation: none;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.18s;
}
@media (min-width: 901px) {
  .app-sidebar,
  .unified-sidebar {
    view-transition-name: sidebar;
  }
  .workspace-topbar {
    view-transition-name: topbar;
  }
}
@media (max-width: 1200px) {
  .entry-header {
    padding: 0 32px;
  }
  .entry-layout {
    margin: 0 24px;
    min-height: 690px;
  }
  .entry-access {
    padding: 48px 40px;
  }
  .entry-story {
    padding: 42px 36px 28px;
  }
  .dashboard-content {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px;
  }
  .dashboard-aside {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    display: grid;
  }
  .dashboard-aside .card {
    padding: 16px;
  }
  .dashboard-aside .aside-tasks {
    min-height: 0;
  }
  .dashboard-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-page {
    grid-template-columns: 234px minmax(0, 1fr);
  }
}
@media (max-width: 900px) {
  .dashboard-page {
    display: block;
  }
  .app-sidebar,
  .unified-sidebar {
    display: none;
  }
  .unified-main {
    width: 100%;
    margin: 0;
  }
  .workspace-topbar {
    height: 72px;
    padding: 12px 20px;
  }
  .workspace-user > div:not(.user-avatar),
  .workspace-user .sync-state {
    display: none;
  }
  .dashboard-page,
  .unified-page {
    padding-bottom: 82px;
  }
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    display: flex;
    justify-content: space-around;
    background: #ffffffed;
    border-top: 1px solid #e4e9ec;
    padding: 9px 6px max(10px, env(safe-area-inset-bottom));
    backdrop-filter: blur(15px);
  }
  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #536777;
    text-decoration: none;
    font-size: var(--text-xs);
    min-width: 50px;
    padding: 4px;
    border-radius: 9px;
  }
  .bottom-nav a.active {
    color: var(--brand-navy);
    background: #f3f5f6;
  }
  .bottom-nav svg {
    width: 21px;
    height: 21px;
  }
  .bottom-nav .nav-glyph {
    font-size: var(--text-lg);
    line-height: 24px;
  }
  .notice,
  .toast {
    bottom: 90px;
  }
  .entry-layout {
    min-height: 640px;
  }
  .entry-access {
    padding: 30px;
  }
  .entry-story h1 {
    font-size: 65px;
  }
  .entry-story {
    padding: 36px 28px;
  }
  .entry-story p {
    font-size: var(--text-xs);
  }
  .story-bottom {
    font-size: var(--text-xs);
    gap: 20px;
  }
  .entry-footer {
    padding: 24px 30px;
  }
  .entry-footer > span:nth-child(2) {
    display: none;
  }
  .entry-header {
    height: 90px;
  }
  .entry-header nav {
    gap: 22px;
  }
  .access-intro h2 {
    font-size: var(--heading-sm);
  }
}
@media (max-width: 600px) {
  .entry-header {
    height: 80px;
    padding: 0 22px;
  }
  .entry-header .brand strong {
    font-size: 26px;
  }
  .entry-header nav a:first-child {
    display: none;
  }
  .entry-header nav {
    font-size: var(--text-xs);
  }
  .entry-layout {
    display: flex;
    flex-direction: column;
    margin: 0 14px;
  }
  .entry-story {
    min-height: 335px;
    padding: 28px;
    border-radius: 18px;
  }
  .entry-story h1 {
    font-size: 55px;
    letter-spacing: -3px;
    margin: 22px 0 16px;
  }
  .entry-story h1 br:nth-of-type(1),
  .entry-story h1 em br {
    display: none;
  }
  .entry-story h1 em {
    display: block;
  }
  .entry-story h1 > br:nth-of-type(2) {
    display: none;
  }
  .entry-story p {
    font-size: var(--text-xs);
  }
  .entry-story p br {
    display: none;
  }
  .entry-story > p {
    max-width: 235px;
  }
  .entry-kicker {
    font-size: var(--text-xs);
    letter-spacing: 1.1px;
  }
  .story-bottom {
    margin-top: 26px;
    padding-top: 16px;
  }
  .flow-sculpture {
    width: 340px;
    height: 340px;
    right: -185px;
    top: 0;
  }
  .entry-access {
    padding: 38px 18px 20px;
  }
  .access-intro h2 {
    font-size: 32px;
  }
  .access-note {
    margin-top: 25px;
  }
  .entry-footer {
    padding: 20px 30px;
    font-size: var(--text-xs);
  }
  .entry-footer a {
    white-space: nowrap;
  }
  .dashboard-content {
    padding: 16px;
    gap: 20px;
  }
  .dashboard-hero,
  .hero {
    padding: 28px;
    min-height: 245px;
  }
  .dashboard-hero h1 {
    font-size: 42px;
  }
  .dashboard-hero p br {
    display: none;
  }
  .dashboard-metrics {
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-metrics > *:last-child {
    grid-column: 1/-1;
    min-height: 55px;
  }
  .dashboard-metrics > * {
    padding: 12px;
    min-height: 82px;
  }
  .dashboard-metrics small {
    font-size: var(--text-xs);
  }
  .dashboard-aside {
    grid-template-columns: 1fr;
  }
  .dashboard-aside .aside-tasks {
    display: none;
  }
  .workspace-topbar .global-search {
    width: auto;
    flex: 1;
  }
  .workspace-user {
    margin: 0;
  }
  .workspace-topbar {
    gap: 12px;
  }
  .mobile-nav {
    margin-left: auto;
  }
  .dashboard-page #assignmentForm {
    display: block;
  }
  .dashboard-page #assignmentForm .button {
    margin-top: 20px;
  }
  .section-heading {
    gap: 10px;
  }
  .card,
  .dashboard-page .card,
  .unified-main .card {
    padding: 20px;
  }
  .unified-main > .shell {
    padding: 0 16px 24px;
  }
  .unified-main > .shell > .topbar {
    margin: 0 -16px;
    padding: 12px 16px;
    height: auto;
    min-height: 72px;
    flex-wrap: wrap;
  }
  .unified-main .topbar .brand {
    display: none;
  }
  .settings-grid,
  .social-layout,
  .help-grid {
    grid-template-columns: 1fr;
  }
  .section-page-heading h1 {
    font-size: 40px;
  }
  .creation-collapsible > summary small {
    display: none;
  }
  .entry-access .login-switch {
    font-size: var(--text-xs);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}
.editorial-login::after,
.about-page::after {
  display: none;
}
.about-main {
  max-width: 1184px;
  margin: 20px auto 80px;
  padding: 0 24px;
}
.about-hero {
  padding: 70px;
  border-radius: 24px;
  background: var(--brand-navy);
  color: var(--canvas);
  position: relative;
  overflow: hidden;
}
.about-hero h1 {
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 500;
  line-height: 1.04;
  max-width: 770px;
  margin: 24px 0;
}
.about-hero h1 em {
  font-style: normal;
  color: var(--brand-white);
}
.about-hero p {
  max-width: 520px;
  line-height: 1.8;
  color: #e4e9ec;
}
.about-hero .button {
  background: var(--brand-white);
  color: #1b365d;
  padding: 13px 24px;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 28px;
}
.about-grid article {
  padding: 30px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 17px;
}
.about-grid article > span {
  color: #536777;
  font-size: var(--text-xs);
}
.about-grid h2 {
  font-size: var(--text-xl);
  font-weight: 500;
  margin: 35px 0 16px;
}
.about-grid p {
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--muted);
}
@media (max-width: 650px) {
  .about-hero {
    padding: 32px;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-grid h2 {
    margin-top: 18px;
  }
}
.entry-header .brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
}
.entry-header .brand__mark > span {
  font-size: var(--text-lg);
  align-self: flex-start;
  margin-top: 6px;
  letter-spacing: 0;
}
.editorial-login .login-card .button {
  width: 100%;
}
.editorial-login .access-intro h2 {
  white-space: normal;
}
.entry-access .login-card:has(#max-login[hidden]) .login-divider {
  display: none;
}
.sidebar-nav a[aria-current="page"] {
  background: var(--brand-white);
  color: #1b365d;
}
/* Brand applications and shared interaction states */
body {
  font-family: var(--font-ui);
}
.entry-story,
.about-hero {
  background: var(--brand-navy);
}
.entry-story h1 em,
.about-hero h1 em,
.dashboard-hero h1 em {
  color: var(--brand-white);
}
.entry-kicker > span {
  background: var(--brand-blue);
}
.brand__mark,
.sidebar-brand .brand__mark {
  background: var(--brand-blue);
  color: var(--brand-white);
}
.sidebar-nav a.is-active,
.sidebar-nav a.active,
.sidebar-nav a[aria-current="page"],
.unified-sidebar .nav-item.active {
  background: var(--brand-blue);
  color: var(--brand-white);
}
.sidebar-nav a:hover,
.unified-sidebar .nav-item:hover {
  background: #0072ce38;
  color: #fff;
}
.bottom-nav a.active {
  background: var(--primary-soft);
  color: var(--brand-navy);
}
.entry-header .brand strong {
  color: var(--brand-black);
}
.brand-plus {
  color: var(--brand-blue);
}
.entry-access .max-login {
  background: var(--brand-white);
  color: var(--brand-navy);
  border-color: var(--brand-gray);
}
.about-hero .button {
  background: var(--brand-blue);
  color: var(--brand-white);
}
.access-note > span {
  color: var(--brand-blue);
}
.login-card .button--primary,
.button--primary,
.dashboard-page .button--primary {
  background: var(--brand-blue);
  color: #fff;
}
.button--primary:hover {
  background: var(--brand-navy);
}
.entry-story p,
.story-bottom,
.entry-kicker {
  color: #e4e9ec;
}
.page-loading {
  padding: 60px;
  grid-column: 1/-1;
}
.skeleton {
  height: 90px;
  border-radius: 12px;
  background: linear-gradient(
    100deg,
    #a2acab20 25%,
    #a2acab50 40%,
    #a2acab20 65%
  );
  background-size: 200% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
}
.page-error {
  padding: 30px;
}
.notifications__list {
  z-index: 60;
}
.calendar-event {
  text-decoration: none;
  color: inherit;
}
.calendar-event:hover {
  border-color: var(--brand-blue);
}
.form-error {
  color: var(--red);
}
.app-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  color: var(--text);
  box-shadow: 0 20px 70px #10182030;
}
.app-dialog::backdrop {
  background: #10182070;
  backdrop-filter: blur(3px);
}
.app-dialog form {
  display: grid;
  gap: 16px;
}
.app-dialog h2 {
  margin: 0 0 6px;
}
.app-dialog label {
  display: grid;
  gap: 8px;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.dialog-actions .button {
  margin-top: 0;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.filter-row select {
  max-width: 240px;
}
.file-drop.is-dragging {
  border-color: var(--primary);
  background: var(--primary-soft);
}
@keyframes skeleton {
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }
}
@media (max-width: 900px) {
  .bottom-nav a {
    display: flex;
    grid-template-columns: none;
  }
  .bottom-nav a span {
    font-size: var(--text-xs);
  }
  .bottom-nav a svg {
    width: 21px;
    height: 21px;
  }
}

.dashboard-page .global-search input {
  padding-left: 40px;
}

/* Shared navigation and compact workspace headings. */
.sidebar-nav a,
.unified-sidebar .nav-item {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.4;
}
.sidebar-nav a span,
.unified-sidebar .nav-item span {
  font: inherit;
}
.unified-main .section-heading h1,
.unified-main .card h1 {
  font-size: var(--text-xl);
  line-height: 1.25;
  margin: 0;
}
.unified-main .section-heading .eyebrow,
.unified-main .card > .eyebrow {
  display: none;
}
.unified-main .section-heading {
  margin: 20px 0 16px;
}
.section-page .dashboard-main {
  padding-top: 20px;
}
.section-page .dashboard-aside {
  padding-top: 20px;
}
.chat-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--brand-navy);
  font: 600 var(--text-sm)/1 var(--font-ui);
}
.chat-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.person-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.person-row__text {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.chat-message {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 85%;
  min-width: 0;
  justify-self: start;
}
.chat-message--outgoing {
  flex-direction: row-reverse;
  justify-self: end;
}
.chat-message .message {
  max-width: 100%;
  background: var(--surface-soft);
}
.chat-message--outgoing .message {
  background: var(--primary-soft);
}
.profile-card__avatar .chat-avatar {
  width: 100%;
  height: 100%;
}
.dashboard-hero,
.unified-main .hero {
  min-height: 0;
  padding: 20px 24px;
  margin: 20px 0;
}
.dashboard-hero .eyebrow,
.unified-main .hero .eyebrow {
  display: none;
}
.dashboard-hero h1,
.unified-main .hero h1 {
  font-size: var(--text-xl);
  line-height: 1.25;
  margin: 0 0 8px;
}
.dashboard-hero > div > p {
  display: none;
}

/* Legal documents and personal-data controls stay available without the app shell. */
.legal-page {
  display: block;
  min-height: 100vh;
  padding: 32px 20px;
}
.legal-content {
  width: min(100%, 820px);
  margin: 0 auto 32px;
  padding: clamp(24px, 5vw, 48px);
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.legal-content h1 {
  margin: 20px 0;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.2;
}
.legal-content h2 {
  margin-top: 28px;
}
.legal-content p {
  margin: 16px 0;
}
.legal-content form {
  display: grid;
  gap: 20px;
  margin: 24px 0;
}
.legal-content label {
  display: grid;
  gap: 8px;
}
.legal-footer {
  width: 100%;
  padding: 24px;
  color: var(--text-secondary, #596579);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  clear: both;
}
.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}
.legal-footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-footer p {
  max-width: 850px;
  margin: 12px auto 0;
}
.legal-acceptance {
  border-block: 1px solid var(--border, #dbe1e8);
  padding: 12px 0 20px;
}
.legal-content .consent-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
}
.consent-choice input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: #1b365d;
}
.legal-warning {
  background: #fff4db;
  padding: 16px;
  border-radius: 12px;
  color: #765000;
}
.personal-data {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr);
  gap: 12px 20px;
  margin: 24px 0;
}
.personal-data dt {
  font-weight: 600;
}
.personal-data dd {
  margin: 0;
}
.privacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.privacy-pending {
  text-align: center;
}
.dashboard-page > .legal-footer {
  grid-column: 1 / -1;
}
@media (max-width: 800px) {
  .legal-page {
    padding: 16px 12px;
  }
  .unified-page > .legal-footer,
  .dashboard-page > .legal-footer {
    padding-left: 24px;
  }
  .personal-data {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .personal-data dd {
    margin-bottom: 12px;
  }
}

/* The home greeting follows the typography of the sign-in headline. */
.dashboard-hero h1 {
  font-family: var(--font-ui);
  font-size: clamp(38px, 4.5vw, 64px);
  font-weight: 500;
  line-height: 0.99;
  letter-spacing: -0.055em;
}
.dashboard-hero h1 em {
  font-style: normal;
  font-weight: inherit;
  color: var(--brand-white);
}

/* Keep every legal footer in normal flow, after the entire page. */
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body > .legal-footer {
  margin-top: auto;
  flex-shrink: 0;
}
body.dashboard-page {
  display: grid;
  grid-template-rows: 1fr auto;
}
.unified-app {
  display: grid;
  grid-template-columns: 234px minmax(0, 1fr);
  flex: 1;
}
.unified-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  width: 234px;
}
.unified-main {
  margin-left: 0;
  width: 100%;
  min-width: 0;
}
.legal-footer {
  overflow-wrap: anywhere;
}
.sidebar-nav a {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}
.sidebar-nav a,
.bottom-nav a,
.mobile-nav a,
.topbar__right a {
  position: relative;
}
.nav-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 12px;
  background: #1b365d;
  color: #fff;
  font: 600 11px/1 var(--font-ui);
  margin-left: auto;
}
.nav-badge[hidden],
.scheduled-input[hidden],
.schedule-form[hidden] {
  display: none;
}
.bottom-nav .nav-badge {
  position: absolute;
  top: 0;
  right: 0;
}
.mobile-nav .nav-badge {
  margin-left: 8px;
}
.schedule-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 16px 0;
}
.schedule-form label {
  flex: 1 1 220px;
}
.assignment-scheduled {
  color: var(--text-secondary);
}
.motivation-enter {
  animation: motivation-appear 850ms ease-out both;
}
@keyframes motivation-appear {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 901px) and (max-width: 1050px) {
  .unified-app {
    grid-template-columns: 78px minmax(0, 1fr);
  }
  .unified-sidebar {
    width: 78px;
  }
  .unified-sidebar .nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
  }
}
@media (max-width: 900px) {
  body.dashboard-page {
    display: flex;
  }
  .app-workspace {
    flex: 1;
  }
  .unified-app {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .motivation-enter {
    animation: none;
  }
}

/* Preserve block-width content inside the page's vertical flex layout. */
body::after {
  display: none;
}
body > .shell,
.entry-header,
.entry-footer,
.entry-layout {
  width: 100%;
}
.legal-footer a {
  color: inherit;
}
.dashboard-hero h1 br {
  display: initial;
}
.dashboard-hero h1 {
  overflow-wrap: anywhere;
}

/* Desktop navigation owns its full viewport and legal information. */
.settings-grid {
  align-items: start;
}
.settings-grid > .card {
  height: auto;
  align-self: start;
}
.privacy-settings {
  margin-top: 24px;
}
.privacy-settings h2 {
  margin-top: 0;
}
.privacy-danger {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #ead2d2;
}
.button--danger {
  color: #a12626;
  border-color: #dbaaaa;
  background: #fff5f5;
}
.sidebar-heading {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.sidebar-toggle,
.sidebar-logout {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.sidebar-toggle {
  padding: 8px;
  border-radius: 8px;
}
.sidebar-toggle svg,
.sidebar-logout svg,
.sidebar-legal-shortcut svg {
  width: 20px;
  height: 20px;
}
.sidebar-logout {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  text-align: left;
}
.sidebar-legal-shortcut {
  display: none;
}
.sidebar-legal {
  display: none;
}
@media (min-width: 901px) {
  body.dashboard-page,
  .unified-app {
    display: block;
  }
  body.dashboard-page,
  body.unified-page {
    --sidebar-width: 270px;
  }
  html.sidebar-collapsed body.dashboard-page,
  html.sidebar-collapsed body.unified-page {
    --sidebar-width: 78px;
  }
  .app-sidebar,
  .unified-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    height: 100dvh;
    z-index: 30;
    padding: 14px 10px;
    display: flex;
    overflow: hidden;
    transition: none;
  }
  .app-workspace,
  .unified-main {
    width: auto;
    min-width: 0;
    margin-left: var(--sidebar-width);
    transition: none;
  }
  .sidebar-heading .sidebar-brand {
    flex: 1;
    min-width: 0;
    padding: 0 4px 14px;
    justify-content: flex-start;
  }
  .sidebar-heading .sidebar-brand > .sidebar-brand-text {
    display: grid;
    white-space: nowrap;
  }
  .sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    align-content: start;
  }
  .sidebar-nav .nav-item {
    padding: 0 12px;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    justify-content: initial;
  }
  .sidebar-nav .nav-item span {
    display: inline;
  }
  .sidebar-bottom {
    flex-shrink: 0;
    margin-top: 8px;
  }
  .sidebar-legal {
    display: block;
    flex-shrink: 0;
    padding: 12px 4px 0;
    border-top: 1px solid #ffffff26;
    color: #c3d0df;
    font-size: 10px;
    line-height: 1.45;
  }
  .sidebar-legal nav {
    gap: 5px 10px;
  }
  .sidebar-legal p {
    margin-top: 8px;
  }
  body > .mobile-legal-footer {
    display: none;
  }
  .sidebar-collapsed .sidebar-heading {
    flex-direction: column;
  }
  .sidebar-collapsed .sidebar-brand-text,
  .sidebar-collapsed .sidebar-nav span,
  .sidebar-collapsed .sidebar-logout span,
  .sidebar-collapsed .sidebar-legal {
    display: none !important;
  }
  .sidebar-collapsed .sidebar-heading .sidebar-brand {
    padding: 0 0 6px;
  }
  .sidebar-collapsed .sidebar-nav .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
  }
  .sidebar-collapsed .nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
  }
  .sidebar-collapsed .sidebar-logout {
    justify-content: center;
  }
  .sidebar-collapsed .sidebar-legal-shortcut {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    padding: 12px;
    color: #c3d0df;
  }
  .workspace-topbar,
  main.shell > .topbar {
    justify-content: flex-start;
  }
}
@media (max-width: 900px) {
  .sidebar-toggle,
  .sidebar-legal {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-sidebar,
  .unified-sidebar,
  .app-workspace,
  .unified-main {
    transition: none;
  }
}

.mobile-only-logout {
  display: none;
}
@media (max-width: 900px) {
  .mobile-only-logout {
    display: block;
    margin: 20px;
  }
}
@media (min-width: 901px) {
  body.unified-page .unified-main,
  body.dashboard-page .app-workspace {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
  }
  .sidebar-toggle {
    flex-shrink: 0;
  }
}

/* A single flow prevents empty grid cells between settings cards. */
.settings-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, 780px);
  gap: 20px;
  margin: 28px auto 0;
}
.settings-grid > .card {
  width: 100%;
  min-width: 0;
  align-self: auto;
  margin: 0;
}
.settings-grid .privacy-actions {
  align-items: center;
}
.settings-grid .privacy-actions a {
  overflow-wrap: anywhere;
}
@media (min-width: 901px) {
  :is(.app-sidebar, .unified-sidebar) .sidebar-heading {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 4px 0;
    padding-bottom: 8px;
  }
  :is(.app-sidebar, .unified-sidebar) .sidebar-heading .sidebar-brand {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 0;
    padding: 0;
    width: 100%;
  }
  .sidebar-heading .brand__mark {
    width: 49px;
    height: 49px;
    justify-self: center;
  }
  .sidebar-heading .sidebar-brand-text {
    min-width: 0;
  }
  .sidebar-heading .sidebar-toggle {
    grid-column: 1;
    display: grid;
    place-items: center;
    width: 58px;
    height: 40px;
    padding: 0;
  }
  :is(.app-sidebar, .unified-sidebar) .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    scrollbar-width: thin;
  }
  :is(.app-sidebar, .unified-sidebar) .sidebar-nav .nav-item {
    display: grid;
    flex: 0 0 46px;
    height: 46px;
    min-height: 46px;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
  }
  :is(.app-sidebar, .unified-sidebar)
    :is(.nav-item, .sidebar-toggle, .sidebar-logout, .sidebar-legal-shortcut)
    svg {
    display: block;
    width: 24px;
    height: 24px;
    min-width: 24px;
    flex: 0 0 24px;
    margin: 0;
  }
  .sidebar-collapsed
    :is(.app-sidebar, .unified-sidebar)
    .sidebar-nav
    .nav-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    padding: 0;
    gap: 0;
  }
  .sidebar-collapsed .sidebar-bottom {
    padding: 0;
  }
  .sidebar-collapsed :is(.sidebar-logout, .sidebar-legal-shortcut) {
    display: grid;
    place-items: center;
    width: 58px;
    height: 46px;
    padding: 0;
  }
  .sidebar-collapsed :is(.app-sidebar, .unified-sidebar) * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  .sidebar-collapsed :is(.app-sidebar, .unified-sidebar) :is(a, button):hover {
    transform: none;
  }
  .sidebar-collapsed :is(.app-sidebar, .unified-sidebar) {
    view-transition-name: none;
  }
}
.legal-document-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.legal-document-list a {
  display: block;
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
}
.legal-document-list a:hover {
  background: var(--primary-soft);
}
.legal-document-list strong,
.legal-document-list span {
  display: block;
}
.legal-document-list span {
  color: var(--muted);
  font-size: var(--text-sm);
  margin-top: 4px;
}
.legal-back-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.help-role-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.help-role-picker [aria-pressed="true"] {
  background: var(--brand-navy);
  color: white;
}
.help-guide {
  max-width: 900px;
}
.help-guide details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 0;
  background: var(--surface, white);
}
.help-guide summary {
  font-weight: 600;
  cursor: pointer;
}
.help-guide ol {
  padding-left: 24px;
}
.help-guide li + li {
  margin-top: 8px;
}
.help-guide figure {
  margin: 20px 0 0;
}
.help-guide img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.help-guide figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.assignment-editor {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.assignment-editor form {
  display: grid;
  gap: 14px;
}
.assignment-editor .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.assignment-editor .checkbox-label input {
  width: auto;
}
.editor-error {
  color: var(--red);
}
.attempt-history {
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.attempt-history summary {
  cursor: pointer;
  font-weight: 600;
}
.attempt-history article {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
.member-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.member-search-result span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.calendar-event--deadline {
  border-left: 5px solid var(--primary);
}
.calendar-event--publication {
  border-left: 5px solid #7851a9;
  background: #f8f4ff;
}
.calendar-event > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.calendar-event > div:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.calendar-event a {
  font-weight: 600;
}
@media (max-width: 600px) {
  .member-search-result {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Layout restoration never animates; transitions belong only to the user's toggle. */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .sidebar-animate :is(.app-sidebar, .unified-sidebar) {
    transition: width 200ms ease;
  }
  .sidebar-animate :is(.app-workspace, .unified-main) {
    transition:
      margin-left 200ms ease,
      width 200ms ease;
  }
}

/* Phone navigation fits one row and reserves the device's safe areas. */
@media (max-width: 900px) {
  :root {
    --mobile-topbar-height: 72px;
    --mobile-nav-height: calc(74px + env(safe-area-inset-bottom, 0px));
  }
  body.dashboard-page,
  body.unified-page {
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  }
  .workspace-topbar,
  .unified-main > .shell > .topbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    height: var(--mobile-topbar-height);
    min-height: var(--mobile-topbar-height);
    padding: 12px 16px;
  }
  .workspace-topbar .global-search,
  .unified-main .topbar .global-search {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
  }
  .global-search input {
    min-width: 0;
    height: 46px;
  }
  .mobile-nav {
    display: block;
    flex: 0 0 auto;
    margin: 0;
  }
  .mobile-nav summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 8px;
    border-radius: 8px;
  }
  .mobile-nav[open] summary {
    background: var(--primary-soft);
  }
  .mobile-nav nav {
    top: calc(100% + 6px);
    min-width: min(280px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: calc(
      100dvh - var(--mobile-topbar-height) - var(--mobile-nav-height) - 24px
    );
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mobile-nav nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
  }
  .mobile-nav nav a svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }
  .mobile-nav nav a .nav-badge {
    margin-left: auto;
  }
  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: var(--mobile-nav-height);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 2px;
  }
  .bottom-nav a {
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 2px 0;
    gap: 3px;
  }
  .bottom-nav a span {
    max-width: 100%;
    white-space: nowrap;
  }
  body :is(input, textarea, select),
  .dashboard-page :is(input, textarea, select) {
    /* Prevent automatic zoom when focusing controls on iOS. */
    font-size: 16px !important;
    max-width: 100%;
    min-width: 0;
  }
  body
    :is(
      input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
      select,
      .button,
      .channel-item,
      .conversation-item
    ) {
    min-height: 44px;
  }
  .material-list a,
  .submission-table td {
    overflow-wrap: anywhere;
  }
  .notice,
  .toast {
    bottom: calc(var(--mobile-nav-height) + 12px);
    max-width: calc(100vw - 32px);
  }
  html {
    scroll-padding-top: calc(var(--mobile-topbar-height) + 12px);
    scroll-padding-bottom: calc(var(--mobile-nav-height) + 12px);
  }
}
@media (max-width: 360px) {
  .bottom-nav a span {
    font-size: 11px;
  }
  .workspace-topbar,
  .unified-main > .shell > .topbar {
    padding-inline: 12px;
  }
}

.assignment-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
  gap: 12px;
  min-width: 0;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--border, #d6dfe5);
  border-radius: 14px;
  background: var(--surface, #fff);
}
.assignment-filters legend {
  padding: 0 6px;
  font-weight: 700;
}
.assignment-filters label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
}
.assignment-filters .checkbox-label {
  display: flex;
  align-items: center;
}
.assignment-filters select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 32px 10px 10px;
  border: 1px solid var(--border, #d6dfe5);
  border-radius: 10px;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23536777' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  color: var(--ink, #18212a);
  font: inherit;
}
.assignment-filters .filter-count {
  grid-column: 1 / -1;
  color: var(--muted);
}
.revision-feedback,
.status-revision_requested {
  color: #774600;
  background: #fff3da;
  border-radius: 8px;
  padding: 10px;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .assignment-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .assignment-filters > .checkbox-label,
  .assignment-filters > button {
    grid-column: 1 / -1;
  }
}

.group-card__top .student-count {
  display: block;
  margin-top: 8px;
  color: #0072ce;
  font-size: 13px;
  font-weight: 500;
}
.group-card__top > div {
  min-width: 0;
}
.group-card__top .course {
  margin-bottom: 0;
}

/* Shared typography follows the calm hierarchy of the home page. */
body,
input,
textarea,
select,
button {
  font-family: var(--font-ui);
}
h1,
h2,
h3 {
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: -0.025em;
}
.unified-main .section-heading h1,
.section-page-heading h1,
.legal-content h1 {
  font-weight: 500;
  font-size: clamp(28px, 2.7vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--brand-navy);
}
.unified-main .card h2,
.unified-main .section-heading h2 {
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* Stable navigation and a footer below short pages. */
body.dashboard-page {
  display: flex;
  flex-direction: column;
}
body.dashboard-page > .app-workspace {
  flex: 1;
}
.page-loading {
  flex: 1;
  width: 100%;
  min-height: 55vh;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.dashboard-shell,
.dashboard-main,
.unified-main > .shell {
  animation: none;
}
.assignment-filters {
  display: block;
  padding: 22px;
  border-radius: 20px;
  margin-bottom: 24px;
}
.assignment-filters legend {
  font-size: 15px;
  color: #536777;
  padding: 0 8px;
}
.assignment-filter-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.assignment-filters select {
  min-height: 48px;
  border-radius: 12px;
  font-size: 14px;
}
.assignment-filter-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e7edf2;
}
.assignment-filters .assignment-pending {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 10px;
  background: #f0f5fa;
  color: #1b365d;
  white-space: nowrap;
  cursor: pointer;
}
.assignment-filters .assignment-pending input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  flex: 0 0 18px;
  accent-color: #0072ce;
}
.assignment-pending:has(input:checked) {
  background: #e1effc;
}
.assignment-filters .filter-count {
  font-size: 13px;
  color: #536777;
}
.assignment-filter-footer > button {
  margin-left: auto;
  width: auto;
  min-height: 40px;
  font-size: 13px;
}
.assignments-page .section-heading {
  align-items: start;
  gap: 20px;
}
.assignments-page #assignments-section > .section-heading h2 {
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
  font-weight: 500;
}
.assignments-page .creation-collapsible {
  border-radius: 18px;
}
.assignment-card {
  border-radius: 18px;
  box-shadow: none;
}
.assignment-card__top {
  gap: 20px;
  padding: 22px;
}
.assignment-card__top h3 {
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.assignment-card__overview {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  flex-shrink: 0;
}
.assignment-card__deadline {
  font-size: 12px;
  color: #536777;
}
.assignment-card__pending {
  color: #0072ce;
  font-size: 12px;
  font-weight: 600;
}
.assignment-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 44px 20px;
  border: 1px dashed #cdd9e3;
  border-radius: 20px;
  background: #ffffff80;
}
.assignment-empty__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: #e5eff8;
  color: #0072ce;
  font-weight: 800;
}
.assignment-empty h3 {
  font-size: 20px;
  margin: 18px 0 8px;
}
.assignment-empty p {
  max-width: 360px;
  margin: 0;
  color: #536777;
  line-height: 1.6;
}
@media (max-width: 1100px) {
  .assignment-filter-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 540px) {
  .assignment-filters {
    padding: 16px;
  }
  .assignment-filter-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .assignment-filter-footer {
    gap: 12px;
  }
  .assignment-filter-footer > button {
    margin-left: 0;
  }
  .assignment-card__top {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
  }
  .assignment-card__overview {
    align-items: flex-start;
  }
  .assignments-page .section-heading {
    flex-direction: column;
  }
}

/* The assignments workspace focuses on the list, without duplicate side widgets. */
.assignments-page .dashboard-content {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1200px;
  margin-inline: auto;
  width: 100%;
}
.assignments-page .dashboard-aside {
  display: none;
}
.assignments-page .assignments-heading {
  margin-bottom: 24px;
}
.assignments-page .assignments-heading h2 {
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.04em;
  font-weight: 500;
}
.assignment-card__top {
  display: flex;
  align-items: center;
  text-align: left;
}
.assignment-card__top > div:first-child {
  flex: 1;
  min-width: 0;
}
@media (max-width: 540px) {
  .assignment-card__top {
    align-items: flex-start;
    position: relative;
    padding-right: 40px;
  }
  .assignment-card__top::after {
    position: absolute;
    right: 16px;
    top: 20px;
  }
}

.recipient-picker {
  border: 1px solid #d6dfe5;
  border-radius: 14px;
  padding: 16px;
  min-width: 0;
}
.recipient-picker legend {
  font-weight: 600;
  padding: 0 6px;
}
.recipient-options {
  max-height: 240px;
  overflow: auto;
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.recipient-options[hidden] {
  display: none;
}
.recipient-options .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.recipient-options input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.assignment-delete {
  color: #b53b43;
}

.event-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border: 0;
  padding: 0;
}
.event-colors legend {
  margin-bottom: 12px;
}
.event-colors label {
  position: relative;
  cursor: pointer;
}
.event-colors input {
  position: absolute;
  opacity: 0;
  width: 32px;
  height: 32px;
}
.event-colors span {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 4px solid white;
}
.event-colors input:checked + span {
  outline: 2px solid #1b365d;
}
.event-colors input:focus-visible + span {
  outline: 3px solid #0074cc;
  outline-offset: 3px;
}
.personal-event-description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.calendar-navigation {
  flex-wrap: wrap;
}
.calendar-day-dots {
  flex-wrap: wrap;
}

/* Navigation renders directly; no shimmer or loading splash. */
.skeleton {
  animation: none;
  background: transparent;
}
#home-load-state:empty,
#page-loading:empty {
  display: none;
}

.editorial-login .access-note strong {
  color: #0068bd;
}

/* Section identity is present in the initial HTML, before modules execute. */
.section-page .dashboard-hero {
  display: none;
}
body {
  font-family: var(--font-ui);
}
h1,
h2,
h3,
h4,
h5,
h6,
summary,
label,
option {
  font-family: var(--font-ui);
}
.section-page-heading h1,
.legal-content h1,
.unified-main .section-heading h1 {
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.about-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
}
.about-page .entry-header {
  width: min(100%, 1240px);
  margin-inline: auto;
}
.about-page .about-main {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 60px 28px;
  flex: 1;
}
.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 64px;
}
.about-intro h1 {
  color: var(--brand-navy);
  font-size: clamp(36px, 4.5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 22px 0;
  font-weight: 500;
}
.about-intro h1 em {
  font-style: normal;
  color: var(--brand-blue);
}
.about-intro p,
.about-bottom p {
  color: var(--muted);
  line-height: 1.7;
}
.about-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
}
.about-text-link {
  color: var(--brand-blue);
  text-decoration: none;
}
.about-preview {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: white;
}
.about-preview ol {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.about-preview li {
  display: flex;
  align-items: start;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.about-preview li:last-child {
  padding-bottom: 0;
}
.about-preview li > span {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--brand-blue);
  font-size: 13px;
}
.about-preview h2 {
  margin: 0;
  font-size: 20px;
}
.about-preview p {
  font-size: 14px;
  margin: 8px 0 0;
}
.about-features {
  margin-top: 80px;
  scroll-margin-top: 24px;
}
.about-features > h2,
.about-bottom h2 {
  color: var(--brand-navy);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  margin: 12px 0 24px;
}
.about-grid h3 {
  font-size: 22px;
  line-height: 1.2;
  margin: 24px 0 14px;
  color: var(--brand-navy);
}
.about-grid article {
  border-radius: 20px;
}
.about-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 48px;
  padding: 32px;
  background: var(--primary-soft);
  border-radius: 20px;
}
.about-bottom p {
  margin-bottom: 0;
}
.about-bottom .button {
  flex-shrink: 0;
}
.about-page > .legal-footer {
  margin-top: auto;
}
@media (max-width: 850px) {
  .about-intro {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-features {
    margin-top: 48px;
  }
  .about-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 480px) {
  .about-page .about-main {
    padding: 32px 18px;
  }
  .about-preview,
  .about-grid article,
  .about-bottom {
    padding: 24px;
  }
  .about-page .entry-header {
    padding: 18px;
    gap: 16px;
    flex-wrap: wrap;
    height: auto;
  }
  .about-page .entry-header nav {
    flex-wrap: wrap;
    gap: 14px;
  }
}
.about-intro .entry-kicker {
  color: var(--muted);
}

/* One mark and wordmark, shared by entry pages and workspace navigation. */
.brand .brand__mark,
.entry-header .brand__mark,
.sidebar-heading .brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border-radius: 13px;
  background: var(--brand-blue);
  color: white;
  font: 800 28px/1 var(--font-ui);
  letter-spacing: -3px;
  box-shadow: none;
}
.brand .brand__mark > span {
  font-size: 20px;
  align-self: flex-start;
  margin-top: 6px;
  letter-spacing: 0;
}
.brand strong,
.sidebar-brand-text strong {
  font: 800 28px/1.1 var(--font-ui);
  letter-spacing: -1.7px;
}
.sidebar-brand-text .brand-plus {
  color: #69baff;
}
.about-actions > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  line-height: 1.2;
}
.about-actions {
  align-items: center;
}
.editorial-login .entry-layout {
  width: min(100% - 48px, 1240px);
  min-height: 620px;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
}
.editorial-login .entry-story {
  padding: 44px 38px 28px;
}
.editorial-login .entry-story h1 {
  font-size: clamp(38px, 4.3vw, 60px);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 58px 0 28px;
}
.editorial-login .entry-story h1 em {
  color: #8bcdff;
}
.editorial-login .entry-access {
  padding: 28px 0;
}
.editorial-login .access-note {
  margin-top: 24px;
}
.entry-access .max-brand-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  background: var(--brand-blue);
  color: white;
  text-decoration: none;
  padding: 14px 18px;
}
.entry-access .max-brand-button[hidden] {
  display: none;
}
.entry-access .max-brand-button:hover {
  background: var(--brand-navy);
}
.max-brand-button img {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}
.max-brand-button > span:first-of-type {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
}
.max-brand-button .max-button-caption {
  font-size: 13px;
  font-weight: 400;
  margin-left: auto;
}
.max-brand-button:focus-visible {
  outline: 3px solid var(--brand-navy);
  outline-offset: 3px;
}
@media (max-width: 850px) {
  .editorial-login .entry-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 600px;
  }
  .editorial-login .entry-story {
    min-height: 0;
  }
  .editorial-login .entry-story h1 {
    margin: 28px 0 20px;
  }
  .editorial-login .story-bottom {
    margin-top: 30px;
  }
  .editorial-login .entry-access {
    padding: 8px 0 24px;
  }
}
@media (max-width: 480px) {
  .editorial-login .entry-layout {
    width: calc(100% - 32px);
  }
  .editorial-login .entry-story {
    padding: 28px 24px;
  }
  .editorial-login .entry-story h1 {
    font-size: 36px;
  }
  .max-brand-button .max-button-caption {
    font-size: 12px;
  }
}
.brand h1 {
  font: 800 28px/1.1 var(--font-ui);
  letter-spacing: -1.7px;
}

/* Keep the sign-in layout stable while the MAX link is prepared. */
#max-login-hint {
  min-height: 3em;
  margin-block: 12px;
}
.entry-access .max-brand-button[aria-disabled="true"] {
  cursor: wait;
  opacity: 1;
}
.entry-access .max-brand-button[aria-disabled="true"]:hover {
  background: var(--brand-blue);
}

.groups-page .dashboard-content {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
}
.groups-page .dashboard-aside {
  display: none;
}

/* Shared controls and page hierarchy; form spacing belongs to the form layout. */
:root {
  --control-height: 44px;
  --control-radius: 10px;
}
.button {
  min-height: var(--control-height);
  border-radius: var(--control-radius);
  font-family: var(--font-ui);
  line-height: 1.2;
}
:is(
    .section-heading,
    .topbar,
    .calendar-navigation,
    .about-actions,
    .home-header-actions
  )
  > .button {
  margin: 0;
  align-self: center;
}
:is(.section-heading, .section-page-heading) {
  gap: 16px;
  align-items: center;
}
:is(.section-heading, .section-page-heading) :is(h1, h2) {
  color: var(--brand-navy);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.12;
}
:is(.section-heading, .section-page-heading) p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.brand .brand__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.workspace-data-error {
  margin-bottom: 20px;
}

/* Transparent brand mark: blue on public pages, white in the dark sidebar. */
.brand .brand__mark,
.entry-header .brand__mark,
.sidebar-heading .brand__mark {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
.brand .brand__mark img {
  filter: brightness(0) saturate(100%) invert(29%) sepia(94%) saturate(2027%)
    hue-rotate(187deg) brightness(91%) contrast(103%);
}
.sidebar-heading .brand__mark img {
  filter: none;
}

/* Legal documents: formal typography; print layout based on GOST R 7.0.97-2025. */
.legal-document-page .legal-content {
  max-width: 210mm;
  font-family: "Times New Roman", Times, serif;
  font-size: 14pt;
  line-height: 1.5;
  letter-spacing: normal;
}
.legal-document-page .legal-content h1 {
  font-family: inherit;
  font-size: 18pt;
  font-weight: 700;
  text-align: center;
}
.legal-document-page .legal-content h2 {
  font-family: inherit;
  font-size: 14pt;
  font-weight: 700;
  text-indent: 1.25cm;
  break-after: avoid;
}
.legal-document-page .legal-content > p {
  text-align: justify;
  text-indent: 1.25cm;
  white-space: pre-line;
  margin: 0 0 0.5em;
  orphans: 3;
  widows: 3;
}
.legal-document-page .legal-content > .muted,
.legal-document-page .legal-content > .legal-warning {
  text-indent: 0;
}
@media screen and (max-width: 600px) {
  .legal-document-page .legal-content {
    font-size: 16px;
    padding: 20px;
  }
  .legal-document-page .legal-content > p {
    text-align: left;
    text-indent: 0;
  }
}
@media print {
  @page {
    size: A4;
    margin: 20mm 10mm 20mm 20mm;
  }
  .legal-document-page {
    display: block;
    padding: 0;
    background: white;
    color: black;
  }
  .legal-document-page .legal-content {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: white;
    color: black;
    font-size: 14pt;
    line-height: 1.5;
  }
  .legal-document-page .legal-back-links,
  .legal-document-page .legal-footer {
    display: none;
  }
  .legal-document-page .legal-content h1 {
    margin: 0 0 20pt;
  }
  .legal-document-page .muted {
    color: black;
  }
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: #536777;
  font-size: var(--text-xs);
  font-weight: 400;
}
.password-toggle {
  width: auto;
  padding: 0 10px;
  font: inherit;
  font-size: var(--text-xs);
}
.password-field input {
  padding-right: 92px;
}

/* Public documents: quiet reading layout with version and section navigation. */
.legal-page .legal-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 44px 32px 64px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid #d9e1e8;
}
.legal-tabs a { color: #536777; text-decoration: none; font-size: 14px; }
.legal-tabs a[aria-current="page"] { color: #1c385b; font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.legal-page .legal-content h1 { max-width: 850px; font-size: clamp(28px, 4vw, 44px); line-height: 1.18; margin: 32px 0 20px; }
.legal-page .legal-content article { max-width: 800px; }
.legal-page .legal-content article p { font-size: 16px; line-height: 1.8; margin: 0 0 20px; overflow-wrap: anywhere; }
.legal-page .legal-content article h2 { font-size: 24px; line-height: 1.35; margin: 40px 0 18px; scroll-margin-top: 24px; }
.legal-toc { display: grid; gap: 10px; margin: 28px 0 40px; padding: 24px 0; border-top: 1px solid #d9e1e8; border-bottom: 1px solid #d9e1e8; }
.legal-toc a { text-decoration: none; line-height: 1.5; }
@media (max-width: 600px) {
  .legal-page .legal-content { padding: 24px 20px 40px; }
  .legal-tabs { gap: 12px 18px; margin-bottom: 24px; }
}
