*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: Onest, Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text); background: var(--bg); line-height: 1.5;
}
img, svg { display: block; max-width: 100%; }

:root {
  --container-max: 1180px;
  --section-pad: clamp(20px, 3vw, 36px);
  --header-h: 64px;
  --tap: 48px;
}

/* Header */
header.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  backdrop-filter: saturate(1.1) blur(8px); -webkit-backdrop-filter: saturate(1.1) blur(8px);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display:flex; align-items:center; gap:10px; font-weight:700; letter-spacing:0.2px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--air_blue-500), var(--space_cadet-600)); box-shadow: var(--shadow-sm); }
nav.primary-nav { display:flex; gap: 18px; align-items:center; }
nav.primary-nav a { color: var(--text-soft); font-weight: 500; padding: 8px 10px; border-radius: 8px; }
nav.primary-nav a:hover { background: var(--surface-alt); }

 /* Hero */
.hero { background: radial-gradient(1200px 500px at 50% -200px, var(--mint_cream-500), #fff 60%); border-bottom: 1px solid var(--border); }
.hero-inner { display:grid; grid-template-columns: 1.1fr 1fr; gap: clamp(16px, 4vw, 36px); padding-block: clamp(28px, 6vw, 64px); align-items: start; }
.hero h1 { font-weight: 700; line-height: 1.1; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; margin: 4px 0 12px; }
.hero p.subcopy { color: var(--text-soft); font-size: clamp(14px, 1.5vw, 16px); margin: 0 0 18px; }

/* Code input group */
.code-form { margin-top: 10px; }
.code-group { display:flex; gap: 10px; align-items:center; flex-wrap: nowrap; }
.code-box {
  width: clamp(44px, 6vw, 56px); height: clamp(52px, 7vw, 60px); border-radius: 12px;
  border:1.5px solid var(--border); background:#fff; text-align:center; font-weight: 700; font-size: clamp(22px, 3vw, 28px); letter-spacing: 0.08em; text-transform: uppercase; box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s;
}
.code-box:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); outline: none; }
.code-box[aria-invalid="true"] { border-color: var(--danger); }

/* Responsive */
@media (max-width: 1199px) { .hero-inner { grid-template-columns: 1fr; } .actions { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .actions { grid-template-columns: 1fr; } .explainer-grid { grid-template-columns: 1fr; } .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } .code-group { gap: 8px; } .code-box { border-radius: 10px; } }
@media (max-width: 859.98px) {
  nav.primary-nav {
    display: none;
  }
}
@media (max-width: 470px) {
  #registerBtn {
    display: none;
  }
}

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

/* Список папок */
.modal-folder-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-folder-item {
  padding: 10px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md); /* 12px */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-folder-item button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.code-actions { display:flex; gap: 10px; align-items:center; margin-top: 12px; flex-wrap: wrap; }
.helper { font-size: 13px; color: var(--text-soft); }
.error { color: var(--danger); font-weight: 600; }

.password-wrap { display:none; margin-top: 10px; }
.password-wrap.visible { display:block; }
.password-input { width: min(340px, 100%); height: 44px; border-radius: 10px; border:1.5px solid var(--border); padding: 0 12px; }
.password-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }

/* Right action cards */
.actions { display:grid; grid-template-columns: 1fr; gap: 14px; }

.table-wrapper {
  overflow-y: auto;
  margin-top: 12px;
  margin-bottom: 60px; /* место под кнопку */
}

.modal-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.modal-content thead th {
  background: var(--surface-2, #f5f5f5);
  padding: 10px;
  /* text-align: left; */
  font-weight: 600;
  border-bottom: 1px solid var(--border);

  position: sticky;
  top: 0;
  z-index: 1;
}

.modal-content tbody td,
.modal-content tbody th {
  /* text-align: left; */
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
}

/* зебра */
.modal-content tbody tr:nth-child(odd) {
  background: var(--surface-1, #fafafa);
}
