/* ==========================================================================
   MARKIN — рабочее пространство
   Статичный макет. Только локальные системные шрифты, без внешних ресурсов.
   ========================================================================== */

:root {
  --ivory: #F6F5F0;
  --white: #FFFFFF;
  --ink: #26352F;
  --muted: #66746C;
  --green: #28684F;
  --border: #E0DDD0;
  --border-soft: #EDEBE2;
  --radius-card: 16px;
  --container-max: 1312px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Golos Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--ivory);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p {
  margin: 0;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

.page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

/* --------------------------------------------------------------------------
   Шапка
   -------------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--green);
  color: var(--ivory);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  user-select: none;
}

.identity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.identity-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.identity-note {
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 0;
  text-align: center;
}

.brand-logo {
  display: block;
  width: 300px;
  max-width: 100%;
  height: auto;
}

.brand-subtitle {
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  min-width: 0;
}

.header-link {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
  user-select: none;
}

/* --------------------------------------------------------------------------
   Вступление
   -------------------------------------------------------------------------- */

.hero {
  padding-top: 60px;
  padding-bottom: 48px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
}

.hero h1 {
  margin-top: 14px;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.hero-subtitle {
  margin-top: 14px;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Заголовок сетки разделов
   -------------------------------------------------------------------------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.section-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.status-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #B3BDB6;
}

/* --------------------------------------------------------------------------
   Сетка 3 + 3 + 2
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 8px;
}

.card {
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  min-height: 244px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--white);
  box-shadow: 0 1px 2px rgba(38, 53, 47, 0.03);
}

.card:nth-child(7),
.card:nth-child(8) {
  grid-column: span 3;
  min-height: 232px;
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.card-index {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card-category {
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.13em;
  color: var(--muted);
  text-align: right;
}

.card-title {
  margin-top: 20px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.card-description {
  margin-top: 10px;
  max-width: 38ch;
  font-size: 15px;
  line-height: 22px;
  color: var(--muted);
}

.card:nth-child(7) .card-description,
.card:nth-child(8) .card-description {
  max-width: 52ch;
}

.card-status {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.card-status::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-radius: 50%;
  background-color: #A6B0A9;
  vertical-align: 2px;
}

/* --------------------------------------------------------------------------
   Подвал
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 28px;
  padding-bottom: 36px;
}

.footer-brand {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-brand-light {
  font-weight: 400;
  color: var(--muted);
}

.footer-note {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Адаптивность
   -------------------------------------------------------------------------- */

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

  .card,
  .card:nth-child(7),
  .card:nth-child(8) {
    grid-column: span 1;
  }

  .card:nth-child(7),
  .card:nth-child(8) {
    min-height: 244px;
  }
}

@media (max-width: 900px) {
  .container {
    padding: 0 28px;
  }

  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 20px;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    gap: 9px;
  }

  .brand-logo {
    width: 268px;
  }

  .identity {
    grid-column: 1;
    grid-row: 2;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 2;
    gap: 18px;
  }

  .hero {
    padding-top: 44px;
    padding-bottom: 36px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-subtitle {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 18px;
  }

  .header-inner {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .brand-logo {
    width: 232px;
  }

  .brand-subtitle {
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  .avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  .identity-name {
    font-size: 13px;
  }

  .header-actions {
    gap: 14px;
  }

  .header-link {
    font-size: 12px;
  }

  .hero {
    padding-top: 36px;
    padding-bottom: 30px;
  }

  .hero h1 {
    font-size: 32px;
    letter-spacing: -0.01em;
  }

  .hero-subtitle {
    margin-top: 10px;
    font-size: 15px;
  }

  .section-head {
    margin-bottom: 14px;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .card {
    min-height: 0;
    padding: 22px;
    border-radius: 14px;
  }

  .card-title {
    margin-top: 16px;
    font-size: 24px;
  }

  .card-description {
    margin-top: 8px;
    max-width: none;
    font-size: 14.5px;
    line-height: 21px;
  }

  .card-status {
    padding-top: 13px;
    margin-top: 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 22px;
    padding-bottom: 28px;
  }
}

@media (max-width: 520px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    align-items: flex-start;
    text-align: left;
  }

  .identity {
    grid-column: 1;
    grid-row: 2;
  }

  .header-actions {
    grid-column: 1;
    grid-row: 3;
    justify-content: flex-start;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 14px;
  }

  .brand-logo {
    width: 200px;
  }

  .header-actions {
    gap: 10px;
  }

  .header-link {
    font-size: 11px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .card {
    padding: 18px;
  }

  .card-title {
    font-size: 22px;
  }
}
