:root {
  font-size: clamp(13px, 0.85vw + 10px, 16px);

  --gap-xs: 0.25em;
  --gap-sm: 0.5em;
  --gap-md: 0.75em;
  --gap-lg: 1em;
  --gap-xl: 1.5em;
  --gap-2xl: 2em;

  --radius-sm: 0.35em;
  --radius-md: 0.55em;
  --radius-lg: 0.75em;

  --tile-h: 8.5em;

  --bg: #f5f5f5;
  --surface: #fff;
  --surface-alt: #fafafa;
  --border: #e5e5e5;
  --border-strong: #bbb;
  --text: #1a1a1a;
  --text-muted: #888;
  --text-faint: #aaa;
  --accent: #c00;
  --accent-soft: rgba(204, 0, 0, 0.12);
  --accent-soft-hover: rgba(204, 0, 0, 0.08);
  --ok: #0a7a0a;
  --ok-soft: rgba(0, 128, 0, 0.12);
  --ink: #1a1a1a;

  --remove-size: 1.4em;

  --header-h: 4.5rem;
  --footer-h: 3rem;
  --actions-h: 0px;
}

/* Дорожка (фон) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

/* Фон дорожки */
::-webkit-scrollbar-track {
  background: transparent;
}

/* Ползунок */
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

/* Ползунок при наведении */
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35);
}

/* Уголок между полосами */
::-webkit-scrollbar-corner {
  background: transparent;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  font-size: 1em;
  overflow: hidden;
}

/* ======== ОБЩИЙ КАРКАС ======== */
.app {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  height: 100dvh;
}

/* ======== ХЭДЭР ======== */
.app-header {
  background: var(--surface);
  border-bottom: 0.08em solid var(--border);
  padding: var(--gap-md) 16px;
  z-index: 10;
  position: relative;
}

.app-header-inner {
  max-width: 52rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--gap-xl);
  flex-wrap: wrap;
}

.app-logo {
  font-size: 1.3em;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ---- МЕНЮ ---- */
.app-nav {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  flex-wrap: wrap;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 0.9em;
  padding: 0.45em 0.9em;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-item.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-item .chevron {
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.35em;
  transition: transform .15s;
  display: inline-block;
}

.nav-dropdown[open] .nav-item .chevron {
  transform: rotate(180deg);
}

.nav-dropdown[open]>.nav-item {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown>summary {
  list-style: none;
  cursor: pointer;
}

.nav-dropdown>summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown-content {
  position: absolute;
  top: calc(100% + 0.4em);
  left: 0;
  min-width: 14em;
  background: var(--surface);
  border: 0.08em solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 0.6em 1.6em rgba(0, 0, 0, 0.12);
  padding: var(--gap-xs);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}

.nav-dropdown-content a {
  display: block;
  padding: 0.5em 0.8em;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9em;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.nav-dropdown-content a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-dropdown-content a.active {
  color: var(--accent);
  font-weight: 600;
}

/* ======== MAIN ======== */
.app-main {
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  min-height: 0;
  padding: 0 16px;
  scroll-behavior: smooth;
}

.app-main-inner {
  max-width: 52rem;
  margin: 0 auto;
}

/* ======== ФУТЕР ======== */
.app-footer {
  background: var(--bg);
  border-top: 0.08em solid var(--border);
  padding: var(--gap-md) 16px;
  font-size: 0.8em;
  color: var(--text-muted);
  text-align: center;
}

/* ======== КОНТЕНТ ======== */
.top-panel {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg);
  padding: var(--gap-lg) 0 0;
}

.content-layer {
  position: relative;
  z-index: 2;
  background: var(--bg);
}

.dropzone {
  border: 0.15em dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: var(--gap-2xl) var(--gap-lg);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.dropzone.disabled {
  opacity: .45;
  pointer-events: none;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--surface-alt);
}

.dropzone-text {
  font-size: 1em;
  color: #444;
}

.dropzone-hint {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-top: var(--gap-xs);
}

.dropzone input {
  display: none;
}

.file-list-wrap {
  display: none;
  margin-top: var(--gap-md);
}

.file-list-wrap.visible {
  display: block;
}

.file-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9em, 1fr));
  gap: var(--gap-sm);
  max-height: calc(2 * var(--tile-h) + var(--gap-sm));
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  grid-auto-rows: var(--tile-h);
}

.file-list li {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--surface);
  border: 0.08em solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--gap-sm) var(--gap-sm);
  position: relative;
  overflow: hidden;
}

.file-icon {
  width: 3.8em;
  height: 3.8em;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .04em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1em;
  margin-bottom: var(--gap-sm);
  flex-shrink: 0;
  line-height: 1.1;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .15s;
}

.file-icon .ext {
  font-size: 0.75em;
}

.file-icon .fsize {
  font-size: 0.55em;
  font-weight: 500;
  opacity: .85;
  letter-spacing: 0;
}

.file-list .name {
  color: var(--text);
  font-size: 0.8em;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.file-count {
  font-size: 0.75em;
  color: var(--text-muted);
  margin-top: var(--gap-xs);
}

.file-list .remove {
  position: absolute;
  top: var(--gap-xs);
  right: var(--gap-xs);
  width: var(--remove-size);
  height: var(--remove-size);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1em;
  line-height: 1;
  font-family: inherit;
  border-radius: var(--radius-sm);
  transform: translateY(-1px);
}

.file-list .remove.disabled {
  opacity: .35;
  pointer-events: none;
}

.file-list .remove:hover {
  color: var(--accent);
  background: var(--accent-soft-hover);
}

.separator {
  border: none;
  border-top: 0.08em solid #e0e0e0;
  margin: var(--gap-lg) 0 0;
}

.actions-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: var(--gap-lg) 0;
  margin: 0;
}

.actions {
  display: flex;
  gap: var(--gap-sm);
}

.actions .spacer {
  flex: 1;
}

.actions.hidden {
  display: none;
}

button {
  font-family: inherit;
  font-size: 0.9em;
  padding: 0.55em 1.1em;
  border-radius: var(--radius-sm);
  border: 0.08em solid #ccc;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

button:hover:not(:disabled) {
  background: #f0f0f0;
}

button.cancel {
  border-color: var(--accent);
  color: var(--accent);
}

button.cancel:hover {
  background: var(--accent);
  color: #fff;
}

button.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

button.primary:hover:not(:disabled) {
  background: #333;
}

button.export {
  border-color: var(--ink);
}

button.export:not(:disabled):hover {
  background: var(--ink);
  color: #fff;
}

button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.progress-wrap {
  display: none;
  margin-top: var(--gap-md);
}

.progress-wrap.visible {
  display: block;
}

.progress-wrap .track {
  position: relative;
  width: 100%;
  height: 3.2em;
  overflow: hidden;
}

.progress-wrap .stream {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 3em;
  height: 3.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
}

.progress-wrap .pdf-icon,
.progress-wrap .binary {
  position: absolute;
  width: 2.2em;
  height: 2.8em;
  transition: opacity 0.15s linear;
}

.progress-wrap .pdf-shape {
  width: 100%;
  height: 100%;
  display: block;
}

.progress-wrap .pdf-shape path {
  fill: var(--accent-soft);
}

.progress-wrap .pdf-shape .fold {
  fill: rgba(204, 0, 0, 0.22);
}

.progress-wrap .binary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  align-items: center;
  justify-items: center;
  opacity: 0;
  font-size: 0.55em;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--accent);
  white-space: nowrap;
  line-height: 1;
  padding: 0.5em 0.1em 0.15em 0.1em;
  -webkit-text-stroke: 0.02em currentColor;
}

.progress-wrap .binary span {
  text-align: center;
}

.progress-wrap .progress-bar {
  position: relative;
  width: 100%;
  height: 0.35em;
  margin-top: var(--gap-xs);
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-wrap .progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
}

.progress-wrap .progress-status {
  text-align: center;
  font-size: 0.85em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-top: var(--gap-sm);
  min-height: 1.3em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {

  .progress-wrap .stream,
  .progress-wrap .pdf-icon,
  .progress-wrap .binary {
    transition: none;
  }
}

.bottom-panel {
  background: var(--bg);
  padding-bottom: var(--gap-xl);
}

.results-sticky {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg);
}

.doc-card {
  background: var(--surface);
  border: 0.08em solid #e0e0e0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-md) var(--gap-lg);
  cursor: pointer;
  user-select: none;
  background: var(--surface);
  transition: background .12s;
  min-width: 0;
}

.doc-header:hover {
  background: var(--surface-alt);
}

.doc-title {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}

.doc-chevron {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform .15s;
  display: inline-block;
}

.doc-card.open .doc-chevron {
  transform: rotate(90deg);
}

.doc-name {
  font-size: 0.9em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 0;
  display: block;
}

.doc-meta {
  display: flex;
  gap: var(--gap-lg);
  flex-shrink: 0;
  font-size: 0.78em;
  color: #777;
  font-variant-numeric: tabular-nums;
  align-items: center;
}

.doc-meta .label {
  color: var(--text-faint);
}

.doc-preview {
  flex-shrink: 0;
  width: 1.9em;
  height: 1.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0.08em solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1em;
  line-height: 1;
  transition: background .15s, color .15s, border-color .15s;
}

button.doc-preview:hover {
  background: var(--ink);
  color: #fff;
}

.doc-preview svg {
  width: 1em;
  height: 1em;
  display: block;
}

.doc-body {
  display: none;
  padding: var(--gap-xs) var(--gap-md) var(--gap-md);
  border-top: 0.08em solid #eee;
  background: var(--surface-alt);
}

.doc-card.open .doc-body {
  display: block;
}

.page-card {
  background: var(--surface);
  border: 0.08em solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--gap-sm) var(--gap-lg);
  margin-top: var(--gap-sm);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--gap-md);
  font-size: 0.9em;
  margin-bottom: var(--gap-xs);
}

.page-header .title {
  font-weight: 600;
}

.page-header .orientation {
  font-weight: 400;
  color: var(--text-muted);
}

.page-header .size {
  color: #666;
  font-size: 0.85em;
}

.img-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  table-layout: fixed;
}

.img-table th {
  text-align: left;
  font-weight: 500;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-faint);
  padding: 0.2em 0.6em;
  border-bottom: 0.08em solid #eee;
}

.img-table td {
  padding: 0.35em 0.6em;
  border-bottom: 0.08em solid #f4f4f4;
  font-variant-numeric: tabular-nums;
  vertical-align: baseline;
}

.img-table tr:last-child td {
  border-bottom: none;
}

.img-table th:nth-child(1),
.img-table td:nth-child(1) {
  text-align: left;
}

.img-table th:nth-child(2),
.img-table td:nth-child(2) {
  text-align: center;
}

.img-table th:nth-child(3),
.img-table td:nth-child(3) {
  text-align: right;
}

.dpi-badge {
  display: inline-block;
  padding: 0.05em 0.5em;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85em;
  font-weight: 500;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.dpi-badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.more-toggle {
  margin-top: var(--gap-xs);
  font-size: 0.85em;
  color: #666;
  background: none;
  border: none;
  padding: 0.1em 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.more-toggle:hover {
  color: #000;
  background: none;
}

.more-list {
  display: none;
  margin-top: var(--gap-xs);
}

.more-list.open {
  display: block;
}

.empty {
  font-size: 0.9em;
  color: var(--text-muted);
  padding: 0.1em 0;
}

#results {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

#results>* {
  flex-shrink: 0;
}

.error {
  color: var(--accent);
  font-size: 0.85em;
}

/* МОДАЛЬНОЕ ОКНО ПРЕДПРОСМОТРА PDF */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-md);
  width: min(1100px, 96vw);
  height: min(900px, 96vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1em 3em rgba(0, 0, 0, 0.35);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  padding: var(--gap-sm) var(--gap-lg);
  border-bottom: 0.08em solid var(--border);
  background: var(--surface-alt);
}

.modal-title {
  font-size: 0.9em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.modal-close {
  flex-shrink: 0;
  width: 2em;
  height: 2em;
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1.2em;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.modal-close:hover {
  background: #eee;
  color: var(--accent);
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  background: #f0f0f0;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.scroll-top {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: calc(var(--footer-h) + clamp(0.75rem, 2vw, 1.5rem));
  z-index: 200;

  width: 2.75em;
  height: 2.75em;
  display: flex;
  align-items: center;
  justify-content: center;

  font-family: inherit;
  border: 0.08em solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 0.15em 0.6em rgba(0, 0, 0, 0.12);
  padding: 0;

  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5em) scale(0.9);
  transition: opacity .2s ease, transform .2s ease,
    visibility .2s ease, background .15s, color .15s,
    border-color .15s;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-top:not(:disabled):hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.scroll-top:active {
  transform: translateY(0) scale(0.94);
}

.scroll-top svg {
  width: 1.25em;
  height: 1.25em;
  display: block;
}

/* ==================================================== ДОПОЛНИТЕЛЬНЫЕ СЕКЦИИ АНАЛИЗА */

.doc-summary {
  padding: var(--gap-sm) var(--gap-lg);
  border-bottom: 0.08em solid var(--border);
}

.doc-warnings {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xs);
  margin-bottom: var(--gap-sm);
}

.warn-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.85em;
  padding: 0.35em 0.7em;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.warn-badge svg {
  flex-shrink: 0;
}

.doc-meta-section {
  margin-top: var(--gap-sm);
}

.section-label {
  font-size: 0.8em;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--gap-xs);
}

.meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
}

.meta-table td {
  padding: 0.2em 0.5em;
  border-bottom: 0.05em solid var(--border);
  vertical-align: top;
}

.meta-label {
  white-space: nowrap;
  color: var(--text-muted);
  font-weight: 500;
  width: 1%;
}

.embedded-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-xs);
}

.embedded-tag {
  font-size: 0.8em;
  padding: 0.2em 0.55em;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 0.06em solid var(--border);
}

.obj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
}

.obj-table th,
.obj-table td {
  padding: 0.25em 0.5em;
  border-bottom: 0.05em solid var(--border);
  text-align: left;
}

.obj-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9em;
}

/* -- Страница: секции -- */

.page-section {
  padding: var(--gap-xs) 0;
}

.page-section + .section-label {
  margin-top: var(--gap-sm);
}

.page-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-xs);
  padding: var(--gap-xs) 0;
}

.page-warn-badge {
  font-size: 0.75em;
  padding: 0.2em 0.55em;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.text-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-xs);
}

.stat-badge {
  font-size: 0.8em;
  padding: 0.2em 0.55em;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 0.06em solid var(--border);
  color: var(--text);
}

/* -- Шрифты -- */

.font-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82em;
}

.font-table th,
.font-table td {
  padding: 0.25em 0.4em;
  border-bottom: 0.05em solid var(--border);
  text-align: left;
}

.font-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9em;
}

.font-table td:first-child {
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emb-ok {
  color: var(--ok);
  font-weight: 500;
}

.emb-bad {
  color: var(--accent);
  font-weight: 500;
}

.font-warn {
  font-size: 0.8em;
  color: var(--accent);
  font-weight: 500;
}

/* -- Цветовые пространства -- */

.color-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-xs);
}

.color-badge {
  font-size: 0.8em;
  padding: 0.2em 0.55em;
  border-radius: var(--radius-sm);
  background: #e8f0fe;
  color: #1a56db;
  font-weight: 500;
}

/* -- Ссылки -- */

.links-list {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}

.link-item {
  font-size: 0.82em;
  color: #1a56db;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-item:hover {
  text-decoration: underline;
}

@media (max-width: 48em) {
  .app-header-inner {
    gap: var(--gap-md);
  }

  .app-nav {
    gap: 0.1em;
  }

  .nav-item {
    font-size: 0.85em;
    padding: 0.4em 0.7em;
  }

  .nav-dropdown-content {
    min-width: 12em;
  }

  .actions {
    flex-wrap: wrap;
  }

  .actions .spacer {
    display: none;
  }

  .actions button {
    flex: 1 1 auto;
    min-width: 0;
  }

  .doc-header {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--gap-xs);
    padding: var(--gap-sm) var(--gap-lg);
    padding-right: calc(2.9em + var(--gap-lg));
  }

  .doc-title {
    width: 100%;
    flex: 1 1 auto;
  }

  .doc-meta {
    font-size: 0.75em;
    gap: var(--gap-sm);
    flex-wrap: wrap;
    width: 100%;
    padding-right: 0;
  }

  .doc-preview {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2.9em;
    height: auto;
    border-radius: 0;
    border: none;
    border-left: 0.08em solid var(--border);
    background: var(--surface);
    font-size: 1em;
  }

  .doc-preview svg {
    width: 1.15em;
    height: 1.15em;
  }

  .doc-body {
    padding: var(--gap-xs) var(--gap-sm) var(--gap-sm);
  }

  .page-card {
    padding: var(--gap-xs) var(--gap-md);
  }

  .page-header {
    font-size: 0.85em;
  }
}
