:root {
  --bg: #ffffff;
  --text: #20242b;
  --line: #d9dee8;
  --shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

#TSGBanner {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 50;
}

#TSGBanner img {
  display: block;
  height: 100px;
  width: auto;
}

#TSGFigur3 {
  position: fixed;
  top: 85px;
  left: 0;
  z-index: 10;
  pointer-events: none;
}

#TSGFigur3 img {
  display: block;
  height: 200px;
  width: auto;
}

#Start {
  position: fixed;
  left: 10px;
  z-index: 60;
}

.site-public #Start {
  top: 10px;
}

.site-internal #Start {
  top: 17px;
}

#Start > a,
#Start > span {
  display: inline-flex;
}

#TopNav {
  position: fixed;
  top: 10px;
  left: 138px;
  right: 230px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
}

#TopNav.topnav--about {
  top: 10px;
}

#TopNav.topnav--public {
  top: 10px;
}

.button,
.icon-button {
  appearance: none;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.icon-button.icon-button--green {
  background: radial-gradient(circle at center, #e8f8e8 0%, #d6f0d6 38%, #bfe9bf 100%);
}

.icon-button.icon-button--yellow {
  background: radial-gradient(circle at center, #fff7c7 0%, #fff0aa 38%, #ffe88d 100%);
}

.icon-button.icon-button--red {
  background: radial-gradient(circle at center, #ffe1e1 0%, #ffd0d0 38%, #ffbcbc 100%);
}

.icon-button.icon-button--blue {
  background: radial-gradient(circle at center, #e2ecff 0%, #d0e1ff 38%, #bfd7ff 100%);
}

.icon-button.icon-button--orange {
  background: radial-gradient(circle at center, #ffe8c9 0%, #ffddb4 38%, #ffd39b 100%);
}

.icon-button.icon-button--purple {
  background: radial-gradient(circle at center, #eee1ff 0%, #e3d1ff 38%, #d9c1ff 100%);
}

.icon-button.icon-button--teal {
  background: radial-gradient(circle at center, #def7f5 0%, #caf1ee 38%, #b7ece8 100%);
}

.icon-button.icon-button--gray {
  background: radial-gradient(circle at center, #f1f1f1 0%, #e7e7e7 38%, #dddddd 100%);
}

.nav-main-button {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  min-height: 35px;
  font: inherit;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: center;
}

.nav-main-button:hover {
  transform: translateY(-1px);
}

.nav-main-button--green {
  background: radial-gradient(circle at center, #e8f8e8 0%, #d6f0d6 38%, #bfe9bf 100%);
  color: #1b5c2d;
}

.nav-main-button--brand {
  background: radial-gradient(circle at center, #f7f4ff 0%, #b8abf3 52%, #8a7ce0 100%);
  color: #40389a;
  border-color: rgba(90, 83, 179, 0.22);
}

.nav-main-button--nav {
  min-width: 152px;
}

.nav-main-button--nav-start {
  min-width: 118px;
}

.nav-main-button--hero,
.nav-main-button--hero-sub {
  border-radius: 14px;
  padding: 18px 22px;
  min-height: 72px;
  font-weight: 500;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

.nav-main-button--hero {
  min-width: 240px;
  font-size: 1.5rem;
}

.nav-main-button--hero-sub {
  min-width: 240px;
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}

.page {
  position: relative;
  min-height: 100vh;
  padding-top: 140px;
  padding-left: 110px;
  padding-right: 40px;
  padding-bottom: 40px;
}

.page--home {
  padding-top: 185px;
  padding-left: 40px;
  padding-right: 40px;
}

.page--curriculum-home {
  padding-top: 205px;
  padding-left: 40px;
  padding-right: 40px;
}

.page--home .hero-buttons,
.page--curriculum-home .sub-buttons {
  max-width: 980px;
  margin: 0 auto;
}

.hero-buttons {
  position: relative;
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.hero-button {
  position: static;
}

.hero-button,
.sub-button {
  display: flex;
  justify-content: center;
}

.sub-buttons {
  position: relative;
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.sub-button {
  position: static;
}

.section-title {
  margin: 0 0 24px 0;
  font-size: 1.68rem;
  line-height: 1.2;
  transform: translateX(-20px);
  font-weight: 400;
  font-family: Georgia, "Times New Roman", serif;
}

.matrix {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 18px;
  max-width: 1100px;
}

.matrix-button {
  min-height: 58px;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.matrix-button:hover {
  transform: translateY(-1px);
}

.matrix-button--green {
  background: radial-gradient(circle at center, #e8f8e8 0%, #d6f0d6 38%, #bfe9bf 100%);
}

.matrix-button--yellow {
  background: radial-gradient(circle at center, #fff7c7 0%, #fff0aa 38%, #ffe88d 100%);
}

.matrix-button--red {
  background: radial-gradient(circle at center, #ffe1e1 0%, #ffd0d0 38%, #ffbcbc 100%);
}

.matrix-button--blue {
  background: radial-gradient(circle at center, #e2ecff 0%, #d0e1ff 38%, #bfd7ff 100%);
}

.matrix-button--orange {
  background: radial-gradient(circle at center, #ffe8c9 0%, #ffddb4 38%, #ffd39b 100%);
}

.matrix-button--purple {
  background: radial-gradient(circle at center, #eee1ff 0%, #e3d1ff 38%, #d9c1ff 100%);
}

.matrix-button--teal {
  background: radial-gradient(circle at center, #def7f5 0%, #caf1ee 38%, #b7ece8 100%);
}

.matrix-button--gray {
  background: radial-gradient(circle at center, #f1f1f1 0%, #e7e7e7 38%, #dddddd 100%);
}

.empty-hint {
  color: #666;
  font-size: 1rem;
  margin-top: 20px;
}

@media (max-width: 1100px) {
  .page {
    padding-left: 20px;
    padding-right: 20px;
  }

  #TSGFigur3 {
    display: none;
  }

  .matrix {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-buttons,
  .sub-buttons {
    gap: 24px;
  }
}

.table-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
}

.table-wrap--viewport {
  position: relative;
  overflow: auto;
  max-height: calc(100vh - 270px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.table-wrap--viewport .curriculum-table {
  min-width: 1200px;
}

.table-wrap--viewport .curriculum-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
}

.table-wrap--viewport .curriculum-table thead th:first-child {
  z-index: 7;
}

.table-wrap--viewport .curriculum-table td:first-child {
  z-index: 4;
}

@media (max-width: 1200px) {
  .table-wrap--viewport {
    max-height: calc(100vh - 230px);
  }
}

.curriculum-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1200px;
  width: max-content;
  background: #fff;
}

.curriculum-table th,
.curriculum-table td {
  border: 1px solid var(--line);
  padding: 12px 14px;
  vertical-align: top;
  background: #fff;
}

.curriculum-table th {
  font-weight: 700;
  text-align: left;
  background: #f8fafc;
  white-space: nowrap;
}

.curriculum-table th:first-child,
.curriculum-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}

.curriculum-table th:first-child {
  z-index: 3;
  background: #f8fafc;
}

.curriculum-side-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 700;
  text-align: center;
}

.topic-cell {
  white-space: nowrap;
  min-width: 220px;
}

.curriculum-table td.topic-cell--epochal-start,
.curriculum-table td.topic-cell--epochal-end {
  position: relative;
  background: #e6e6e6;
  box-shadow: inset 0 0 0 1px rgba(107, 114, 128, 0.28);
}

.topic-cell--epochal-start {
  padding-top: 24px;
}

.epochal-banner {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #5b5b5b;
  background: transparent;
  padding: 0;
  margin: 0;
  min-height: 0;
  line-height: 1.1;
  pointer-events: none;
  z-index: 2;
  text-transform: lowercase;
  white-space: nowrap;
}

.topic-list {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.topic-chip--green {
  background: #dff3df;
}

.topic-chip--yellow {
  background: #fff4bf;
}

.topic-chip--red {
  background: #ffd7d7;
}

.topic-empty {
  color: #999;
  font-style: italic;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  max-width: 1100px;
}

.admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.admin-card h2,
.admin-card h3 {
  margin-top: 0;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.admin-table th,
.admin-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  vertical-align: top;
  text-align: left;
}

.admin-table th {
  background: #f8fafc;
  white-space: nowrap;
}

.admin-form-grid {
  display: grid;
  gap: 12px;
}

.admin-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.admin-form-row label {
  display: grid;
  gap: 4px;
  font-weight: 600;
}

.admin-form-row input[type="text"],
.admin-form-row input[type="number"],
.admin-form-row select,
.admin-form-row textarea,
.config-upload-label input[type="file"] {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  min-width: 90px;
  background: #fff;
}

.admin-form-row textarea {
  resize: vertical;
  min-height: 90px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 12px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
}

.checkbox-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-item input[type="number"] {
  width: 72px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.small-help {
  color: #666;
  font-size: 0.92rem;
  margin: 0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-grid--wide {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  align-items: start;
}

.admin-card--span2 {
  grid-column: 1 / -1;
}

.admin-form-row--stacked {
  align-items: stretch;
}

.admin-form-row--stacked label {
  flex: 1 1 220px;
}

.admin-form-row--two label {
  flex-basis: calc(50% - 10px);
}

.admin-form-row--three label {
  flex-basis: calc(33.333% - 10px);
}

.admin-form-grow {
  flex: 1 1 100%;
}

.config-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.config-media-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fafbfd;
}

.config-media-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.config-media-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  border: 1px dashed #c7d0df;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.config-media-preview img {
  max-width: 100%;
  height: auto;
  display: block;
}

.config-media-preview--banner img {
  max-height: 100px;
}

.config-media-preview--figure img {
  max-height: 180px;
}

.config-upload-label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  margin-bottom: 10px;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.button--danger {
  background: #fff4f4;
  border-color: #f0c2c2;
  color: #a32020;
  box-shadow: none;
}

.button--danger:hover {
  background: #ffe9e9;
}

.topic-cell-admin {
  display: grid;
  gap: 12px;
  min-width: 340px;
}

.topic-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.topic-edit input[type="text"] {
  flex: 1 1 220px;
  min-width: 220px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.topic-edit input[type="number"],
.topic-edit select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.topic-edit .button {
  box-shadow: none;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.matrix-editor {
  display: grid;
  grid-template-columns: repeat(8, minmax(90px, 1fr));
  gap: 12px;
  max-width: 1100px;
}

.matrix-editor-cell {
  min-height: 72px;
  border: 2px dashed var(--line);
  border-radius: 14px;
  background: #fafbfd;
  padding: 6px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.matrix-editor-cell.is-over {
  background: #eef4ff;
  border-color: #9fb8ff;
}

.matrix-editor-item {
  width: 100%;
  min-height: 56px;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
}

.matrix-editor-item:active {
  cursor: grabbing;
}

.matrix-editor-item.is-dragging {
  opacity: 0.45;
}


.matrix-editor-item.is-selected {
  outline: 3px solid rgba(200, 35, 51, 0.32);
  box-shadow: 0 0 0 3px rgba(200, 35, 51, 0.12), var(--shadow);
}


.matrix-legend {
  margin: 0 0 18px 0;
  color: #666;
  font-size: 0.95rem;
}

.matrix-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.topic-sortable {
  display: grid;
  gap: 10px;
}

.topic-edit {
  position: relative;
  padding-left: 42px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding-top: 10px;
  padding-right: 10px;
  padding-bottom: 10px;
  box-shadow: var(--shadow);
}

.topic-edit.is-dragging {
  opacity: 0.45;
}

.topic-edit--green {
  background: #f1faef;
  border-color: #cfe4cb;
}

.topic-edit--yellow {
  background: #fff9df;
  border-color: #e9dd9b;
}

.topic-edit--red {
  background: #fff0f0;
  border-color: #efc8c8;
}

.drag-handle {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #eef4ff;
  color: #345;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  font-weight: 700;
  z-index: 5;
}

.drag-handle:active {
  cursor: grabbing;
}

.topic-cell-admin.is-over {
  outline: 2px dashed #9fb8ff;
  outline-offset: 4px;
  border-radius: 12px;
}

.topic-add-form {
  margin-top: 10px;
}

.topic-subtitle {
  margin: 0 0 24px 0;
  color: #666;
}

.doc-sections {
  margin-top: 32px;
}

.doc-section-block {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  min-height: 60px;
  margin-left: 60px;
}

.doc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-meta {
  display: grid;
  gap: 8px;
  padding: 0 4px;
  min-width: 0;
}

.doc-empty {
  color: #999;
  font-style: italic;
}

.doc-open-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.section-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.section-inline-form input[type="text"] {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  min-width: 220px;
}

.doc-sortable {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  min-height: 60px;
  margin-left: 60px;
}

.doc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-card.is-dragging {
  opacity: 0.45;
}

.doc-card .preview-frame {
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.doc-caption-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fafbfd;
}

.upload-form input[type="text"],
.upload-form input[type="file"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.doc-card .file-icon {
  padding: 10px;
  gap: 8px;
}

.doc-card .file-icon__badge {
  min-width: 56px;
  padding: 8px 10px;
  font-size: 0.95rem;
  border-radius: 12px;
}

.doc-card .file-icon__label {
  font-size: 0.82rem;
  line-height: 1.2;
}

.doc-card .preview-frame {
  aspect-ratio: 4 / 5;
}

.doc-card {
  width: 100%;
  max-width: 120px;
}

.doc-card .preview-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 16px;
  display: block;
}

.doc-card .preview-image {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover;
}

.doc-card .file-icon {
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 10px;
  gap: 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fcfdff 0%, #eff3f8 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.doc-card .file-icon__badge {
  min-width: 58px;
  padding: 8px 10px;
  font-size: 0.9rem;
  border-radius: 12px;
  font-weight: 800;
}

.doc-card .file-icon__label {
  font-size: 0.8rem;
  line-height: 1.15;
  text-align: center;
}


.user-chip {
  margin-left: auto;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-chip__meta {
  display: grid;
  gap: 2px;
  line-height: 1.1;
}

.user-chip__name {
  font-weight: 700;
}

.user-chip__role {
  color: #666;
  font-size: 0.82rem;
}

.page--auth {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 160px;
}

.auth-card {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
}

.flash-stack {
  display: grid;
  gap: 12px;
  margin: 0 0 18px 0;
}

.message {
  margin: 0 0 16px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef8ee;
  border: 1px solid #cfe9cf;
  color: #285028;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.message--success {
  background: #eef8ee;
  border-color: #cfe9cf;
  color: #285028;
}

.message--warning {
  background: #fff8e8;
  border-color: #ecd9a2;
  color: #6f5508;
}

.message--error {
  background: #fff1f1;
  border-color: #f0c2c2;
  color: #922;
}

.message__text {
  flex: 1 1 auto;
  line-height: 1.45;
}

.message__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  padding: 0;
}

.message__close:hover {
  opacity: 1;
}

.message.is-hidden {
  display: none;
}


.plain-list,
.step-list {
  margin: 0 0 16px 0;
  padding-left: 18px;
}

.plain-list li,
.step-list li {
  margin-bottom: 6px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

code {
  background: #f4f7fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}


.upload-form {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px dashed #cfd8e6;
  border-radius: 16px;
  background: #fbfcff;
  display: grid;
  gap: 12px;
  width: calc(100% - 60px);
  margin-left: 60px;
}

.upload-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.upload-form input[type="file"],
.upload-form input[type="text"] {
  font: inherit;
}

.upload-form input[type="text"] {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.upload-form input[type="text"]:disabled {
  background: #f2f4f7;
  color: #6b7280;
}

.upload-form__status {
  margin: 0;
}

.doc-section-title {
  margin: 0 0 14px 0;
  font-size: 1.36rem;
  font-weight: 400;
  font-family: Georgia, "Times New Roman", serif;
}

.doc-sortable--public {
  align-items: stretch;
}

.doc-meta--readonly {
  padding-top: 2px;
}

.doc-caption-static {
  font-weight: 400;
  font-size: 0.94rem;
  line-height: 1.3;
  hyphens: auto;
  overflow-wrap: anywhere;
  word-break: normal;
}

.form-group-title {
  margin: 0 0 10px 0;
  font-weight: 600;
}

.subject-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px 16px;
  margin-top: 8px;
}

.checkbox-line--compact {
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: #f6f8fb;
  font-size: 0.9rem;
}


.page--public-home {
  padding-top: 180px;
}

.section-title--public-home {
  font-size: 2.6rem;
  text-align: center;
  transform: none;
  margin-bottom: 34px;
}

.page--public-home .sub-buttons {
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 34px;
}

.page--public-home .sub-button {
  position: static;
}

.public-doc-hint {
  margin: 0 0 18px 0;
  padding: 14px 16px;
  border: 1px solid #cfd8e6;
  border-left: 5px solid #5b7fc4;
  border-radius: 12px;
  background: #f7faff;
  color: #2d3d55;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .page--public-home {
    padding-top: 150px;
  }

  .section-title--public-home {
    font-size: 2.1rem;
  }

  .page--public-home .sub-buttons {
    gap: 24px;
  }
}


.site-footer {
  margin-top: 40px;
  padding: 20px 0 28px;
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  color: #5a6677;
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.site-footer__inner a {
  color: #425c8f;
}

.site-footer__sep {
  color: #9aa5b5;
}

.page--legal {
  max-width: 1100px;
  padding-bottom: 10px;
}

.section-title--legal {
  transform: none;
  margin-bottom: 20px;
}

.legal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  max-width: 900px;
}

.legal-card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.18rem;
}

.legal-card p:last-child,
.legal-card ul:last-child {
  margin-bottom: 0;
}

.legal-note {
  max-width: 900px;
  margin: 0 0 18px 0;
  padding: 14px 16px;
  border: 1px solid #cfd8e6;
  border-left: 5px solid #5b7fc4;
  border-radius: 12px;
  background: #f7faff;
  color: #2d3d55;
  line-height: 1.45;
}

.legal-note--warning {
  border-left-color: #c48a2e;
  background: #fffaf0;
}


.topic-subtitle--compact {
  margin-top: -6px;
  margin-bottom: 18px;
  font-size: 0.96rem;
}

.inline-save-status {
  min-width: 110px;
  font-size: 0.92rem;
  color: #5a6677;
}

.inline-save-status.is-pending {
  color: #5a6677;
}

.inline-save-status.is-success {
  color: #2f6b2f;
}

.inline-save-status.is-error {
  color: #922;
}


.section-block-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.section-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef3fb;
  border: 1px solid #d5dfef;
  cursor: grab;
  user-select: none;
  font-size: 18px;
  line-height: 1;
}

.section-drag-handle:active {
  cursor: grabbing;
}

.section-public-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: #edf6ea;
  color: #2f5e2d;
  font-size: 0.92rem;
  font-weight: 600;
}

.doc-section-block.is-dragging {
  opacity: 0.7;
}


.doc-card .file-icon {
  position: relative;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 7px;
  padding: 12px;
  overflow: hidden;
}

.doc-card .file-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0));
  pointer-events: none;
}

.doc-card .file-icon__symbol,
.doc-card .file-icon__badge,
.doc-card .file-icon__label {
  position: relative;
  z-index: 1;
}

.doc-card .file-icon__symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  font-size: 1.55rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

.doc-card .file-icon__badge {
  letter-spacing: 0.04em;
}

.doc-card .file-icon__label {
  max-width: 100%;
}

.doc-card .file-icon--document {
  background: linear-gradient(180deg, #f8fbff 0%, #e8f0ff 100%);
  border-color: #cad8ee;
}

.doc-card .file-icon--document .file-icon__symbol {
  background: linear-gradient(180deg, #ffffff 0%, #eaf1ff 100%);
}

.doc-card .file-icon--document .file-icon__badge {
  background: #2756b3;
  color: #fff;
}

.doc-card .file-icon--table {
  background: linear-gradient(180deg, #f7fdf9 0%, #e5f6ea 100%);
  border-color: #bfdcc7;
}

.doc-card .file-icon--table .file-icon__symbol {
  background: linear-gradient(180deg, #ffffff 0%, #e6f6ea 100%);
}

.doc-card .file-icon--table .file-icon__badge {
  background: #2e7d4a;
  color: #fff;
}

.doc-card .file-icon--presentation {
  background: linear-gradient(180deg, #fffaf7 0%, #fdebdc 100%);
  border-color: #e7c8b2;
}

.doc-card .file-icon--presentation .file-icon__symbol {
  background: linear-gradient(180deg, #ffffff 0%, #fff0e2 100%);
}

.doc-card .file-icon--presentation .file-icon__badge {
  background: #b65c1e;
  color: #fff;
}

.doc-card .file-icon--archive {
  background: linear-gradient(180deg, #fbfbfb 0%, #eceff3 100%);
  border-color: #cfd5de;
}

.doc-card .file-icon--archive .file-icon__symbol {
  background: linear-gradient(180deg, #ffffff 0%, #f0f3f8 100%);
}

.doc-card .file-icon--archive .file-icon__badge {
  background: #4d5a6d;
  color: #fff;
}

.doc-card .file-icon--generic {
  background: linear-gradient(180deg, #fbfcff 0%, #eef2f7 100%);
  border-color: #d0d7e2;
}

.doc-card .file-icon--generic .file-icon__symbol {
  background: linear-gradient(180deg, #ffffff 0%, #f2f5f9 100%);
}

.doc-card .file-icon--generic .file-icon__badge {
  background: #68778d;
  color: #fff;
}

.topic-chip {
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 3px;
  max-width: 280px;
  white-space: normal;
  line-height: 1.15;
}

.topic-chip__title {
  display: block;
}

.topic-chip__intro {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  color: #a11616;
}

.topic-chip--has-methods {
  border-color: rgba(166, 22, 22, 0.35);
}

.topic-chip--active-link {
  outline: 2px solid rgba(198, 40, 40, 0.45);
}

.method-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 7px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 700;
  text-align: center;
}

.method-chip--with-source {
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 3px;
  max-width: 280px;
  border-radius: 18px;
  white-space: normal;
  line-height: 1.15;
}

.method-chip__title {
  display: block;
}

.method-chip__intro {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  color: #a11616;
}

.method-chip--highlight {
  outline: 2px solid rgba(198, 40, 40, 0.45);
}

.table-wrap--methods-visual {
  position: relative;
}

.method-links-overlay {
  position: absolute;
  inset: 0 auto auto 0;
  pointer-events: none;
  overflow: visible;
  z-index: 4;
}

.method-link-path {
  fill: none;
  stroke: #c62828;
  stroke-width: 2.25;
  stroke-linecap: round;
  opacity: 0.92;
}

.methods-row td:first-child {
  z-index: 2;
}

.topic-list--methods {
  align-items: flex-start;
}


.method-floating-target {
  position: fixed;
  z-index: 30;
  max-width: min(340px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 248, 248, 0.96);
  border: 1px solid rgba(198, 40, 40, 0.28);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
  pointer-events: none;
  backdrop-filter: blur(3px);
}

.method-floating-target--hidden {
  display: none;
}

.method-floating-target__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #a11616;
  margin-bottom: 6px;
}

.method-floating-target__items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.method-floating-target__item {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(198, 40, 40, 0.1);
  border: 1px solid rgba(198, 40, 40, 0.16);
  color: #7d1616;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.15;
}

.method-link-wrap {
  margin: 6px 0 10px 36px;
  display: grid;
  gap: 8px;
  width: min(100%, 280px);
  max-width: 280px;
  min-width: 0;
}

.method-link-toggle {
  justify-self: start;
  box-shadow: none;
}

.method-link-form {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #d5dbe6;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.is-hidden {
  display: none !important;
}

.method-link-form.is-hidden {
  display: none;
}

.method-link-form label {
  display: block;
  font-size: 0.92rem;
  min-width: 0;
}

.method-link-form select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 6px;
  box-sizing: border-box;
}

.method-link-summary {
  margin: 0 0 8px 0;
  font-size: 0.88rem;
  color: #5a6677;
  line-height: 1.35;
}

.topic-edit--readonly {
  opacity: 0.88;
}

.drag-handle--disabled {
  cursor: default;
  opacity: 0.35;
}


.admin-card--dirty {
  outline: 2px solid rgba(204, 120, 0, 0.26);
}

.admin-form-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.admin-form-settings label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 260px;
}


.topic-inline-status {
  font-size: 0.9rem;
  color: #4b5563;
  margin-top: 6px;
}

.topic-inline-status--error {
  color: #a32020;
}

.checkbox-inline--large {
  font-size: 1rem;
  font-weight: 700;
}

.page--maintenance {
  max-width: 900px;
}

.maintenance-card {
  margin-top: 140px;
  text-align: center;
}

.maintenance-text {
  font-size: 1.08rem;
  line-height: 1.55;
  margin: 0;
}


.audit-report {
  background: #f7f7f7;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  padding: 18px 20px;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.45;
  overflow: auto;
}
