/* Fonts loaded via <link> in HTML for faster first paint — fallbacks cover Cyrillic */

:root {
  --blue: #2f6bff;
  --blue-hover: #2559e6;
  --blue-soft: #eaf1ff;
  --ink: #152238;
  --muted: #7a8799;
  --line: #e4e9f1;
  --bg: #f6f5f2;
  --card: #ffffff;
  --ok: #22a45a;
  --shadow: 0 10px 30px rgba(21, 34, 56, 0.08);
  --radius: 16px;
  --max: 1180px;
  /* Golos Text + Noto Sans cover Kazakh Cyrillic (ғ, қ, ң, ү, ұ, ә, ө, һ) */
  --font: "Golos Text", "Noto Sans", "Segoe UI", "Arial", sans-serif;
  --hand: "Golos Text", "Noto Sans", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button, .btn, .lang a, .nav a, .format-card, .filters button, .card {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #eef1f6;
}
.top-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 48%, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 50% 48%, transparent 0 10px, #fff 11px 12.5px, transparent 13.5px),
    linear-gradient(145deg, #4d84ff, var(--blue));
  box-shadow: 0 6px 14px rgba(47, 107, 255, 0.28);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffd34d;
  right: 7px;
  top: 8px;
}
.brand strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #14305f;
  line-height: 1.15;
}
.brand small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: #4b5b73;
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  white-space: nowrap;
}
.nav a:hover { color: var(--blue); }
.lang {
  display: flex;
  background: #eef1f6;
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}
.lang a {
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
  color: #607089;
}
.lang a.active {
  background: #152238;
  color: #fff;
}

#app {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 28px 64px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px 40px;
  align-items: center;
  padding: 22px 0 8px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #31445f;
  box-shadow: 0 4px 12px rgba(21, 34, 56, 0.04);
}
h1 {
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.05;
  margin: 16px 0 12px;
  letter-spacing: -0.045em;
  font-weight: 800;
  color: var(--ink);
  max-width: 11ch;
}
.lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 44ch;
  margin: 0 0 20px;
  font-weight: 500;
}
.pickers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 14px;
}
label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #5a6b82;
}
select,
input[type="search"],
input[type="number"],
.custom-form input,
.custom-form select {
  height: 50px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 12px;
  font: inherit;
  font-weight: 650;
  background: #fff;
  color: var(--ink);
}
select:focus, input:focus {
  outline: 2px solid rgba(47, 107, 255, 0.22);
  border-color: #a9bfff;
}
.cta-row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 10px;
  align-items: stretch;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 12px 24px rgba(47, 107, 255, 0.28);
}
.btn.primary:hover { background: var(--blue-hover); }
.btn.ghost {
  background: #eef1f6;
  border-color: transparent;
  color: #243754;
}
.btn.upload-cta {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  padding: 10px 18px;
  min-height: 58px;
}
.btn.upload-cta > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn.upload-cta small {
  font-size: 11px;
  font-weight: 650;
  opacity: 0.9;
  padding-left: 26px;
}
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.privacy-note svg { flex-shrink: 0; color: #6b7c94; }

.hero-visual {
  position: relative;
  margin: 0;
  overflow: visible;
  background: transparent;
}
.hero-visual img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border-radius: 4px;
}

/* Sections */
.block { padding: 34px 0 4px; }
.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.block-head h2,
.page h1,
.steps-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.03em;
  font-weight: 800;
}
.link-all {
  color: var(--blue);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.filters button {
  border: 1px solid #dde3ec;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: #4b5b73;
}
.filters button.on {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.format-card {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 14px;
  padding: 14px 12px;
  text-decoration: none;
  color: inherit;
  min-height: 78px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  content-visibility: auto;
  contain-intrinsic-size: 240px 78px;
}
.format-card:hover {
  border-color: #cdd9ff;
  box-shadow: var(--shadow);
}
.format-card strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
}
.format-card .type {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}
.format-card .size {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 750;
  margin-top: 2px;
}
.format-card .chev {
  color: #b0bac8;
  font-size: 18px;
  font-weight: 700;
}
.format-card.custom {
  background: #eef4ff;
  border-color: #d7e3ff;
}
.format-card.custom strong { color: var(--blue); }
.format-card.custom .icon-box {
  background: #fff;
  color: var(--blue);
}
.flag-wrap, .icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f3f6fb;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.flag-img, .flag {
  width: 26px;
  height: 18px;
  object-fit: cover;
  border-radius: 3px;
  font-size: 20px;
  line-height: 1;
}

/* Steps */
.steps-wrap {
  margin-top: 28px;
  background: #eef3fb;
  border-radius: 24px;
  padding: 28px 22px 22px;
}
.steps-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.steps-head .hand-note {
  font-family: var(--hand);
  font-style: italic;
  font-weight: 700;
  color: var(--blue);
  font-size: 26px;
  transform: rotate(-6deg);
  line-height: 1;
  position: relative;
  letter-spacing: -0.02em;
}
.steps-head .hand-note::after {
  content: "✦";
  font-family: var(--font);
  font-size: 12px;
  position: absolute;
  right: -16px;
  top: -4px;
}
.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.step-grid article {
  background: #fff;
  border-radius: 18px;
  padding: 20px 18px 18px;
  border: 0;
  box-shadow: 0 6px 18px rgba(21, 34, 56, 0.04);
  position: relative;
}
.step-grid .num {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  margin: 0;
}
.step-ico {
  width: 48px;
  height: 48px;
  margin: 18px auto 12px;
  color: var(--blue);
  display: grid;
  place-items: center;
}
.step-grid h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.02em;
  text-align: center;
}
.step-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 500;
  text-align: center;
}

/* Trust */
.trust {
  margin: 18px 0 0;
  background: transparent;
  border-radius: 0;
  padding: 18px 8px 4px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.trust article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
}
.trust .ico {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  box-shadow: none;
}
.trust strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}
.trust span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

/* Footer */
.foot {
  border-top: 1px solid #e8ecf2;
  background: #f3f4f7;
  margin-top: 28px;
}
.foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 28px 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.foot-brand strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.foot-brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  max-width: 28ch;
}
.foot-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
}
.foot-nav a {
  text-decoration: none;
  color: #667789;
  font-weight: 650;
  font-size: 14px;
}
.foot-nav a:hover { color: var(--blue); }
.foot-copy {
  margin: 0;
  color: #8a97a8;
  font-size: 12.5px;
  font-weight: 600;
  text-align: right;
}
.foot-privacy { display: none; }

/* Inner pages */
.page { padding: 18px 0 40px; }
.page.narrow { max-width: 640px; }
.search { width: 100%; margin: 8px 0 14px; }
.custom-form { display: grid; gap: 12px; }
.tips { padding-left: 18px; line-height: 1.7; color: #334; }
.muted { color: var(--muted); font-size: 13px; }
.faq-list { display: grid; gap: 10px; margin-top: 18px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.faq-item strong { display: block; margin-bottom: 6px; font-size: 15px; }
.faq-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Studio */
.studio-head h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
  max-width: none;
  margin-bottom: 4px;
}
.studio-head .flag-img { width: 42px; height: 28px; }
.studio-head p { color: var(--muted); margin-top: 0; }
.back { color: var(--blue); text-decoration: none; font-weight: 700; }
.studio { position: relative; }
.preview-wrap, .upload-pane {
  position: relative;
  background: #fff;
  border-radius: 20px;
  min-height: 460px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 20px;
  margin-top: 16px;
}
.preview-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--photo-ar, 35 / 45);
  overflow: hidden;
  background: #e8eef2;
}
.preview-stage canvas,
#preview,
#modal-preview {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: inherit;
  object-fit: contain;
  vertical-align: top;
}
.drop {
  display: grid;
  place-content: center;
  text-align: center;
  gap: 8px;
  padding: 24px;
  width: 100%;
}
.drop.over { outline: 3px dashed var(--blue); }
.busy {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.78);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  font-weight: 700;
  z-index: 5;
  border-radius: 20px;
}
.spin {
  width: 28px;
  height: 28px;
  border: 3px solid #d7e4ff;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.panel[hidden], .drop[hidden], .busy[hidden], .guides[hidden],
#result-pane[hidden], #upload-pane[hidden] { display: none !important; }
.warn {
  color: #9a4b00;
  background: #fff3d6;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}
.result {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 28px;
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  align-items: start;
}
.result-photo-col { display: grid; gap: 14px; justify-items: center; }
.online-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}
.ruler-frame {
  --ruler: #8b96a0;
  display: grid;
  grid-template-columns: 36px minmax(180px, 260px) 48px;
  grid-template-rows: 28px auto 28px;
  align-items: stretch;
  justify-content: center;
  width: max-content;
  max-width: 100%;
}
.ruler-top { grid-column: 2; grid-row: 1; }
.ruler-left { grid-column: 1; grid-row: 2; }
.ruler-frame .preview-stage { grid-column: 2; grid-row: 2; }
.ruler-right { grid-column: 3; grid-row: 2; }
.ruler-bottom { grid-column: 2; grid-row: 3; }
.ruler-top, .ruler-bottom, .ruler-left, .ruler-right {
  position: relative;
  color: var(--ruler);
  font-size: 12px;
  font-weight: 700;
}
.ruler-top, .ruler-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ruler-top::before, .ruler-top::after,
.ruler-bottom::before, .ruler-bottom::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28%;
  border-top: 1px solid var(--ruler);
}
.ruler-top::before, .ruler-bottom::before { left: 0; }
.ruler-top::after, .ruler-bottom::after { right: 0; }
.ruler-left, .ruler-right {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ruler-left span, .ruler-right span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.ruler-left::before, .ruler-left::after,
.ruler-right::before, .ruler-right::after {
  content: "";
  position: absolute;
  left: 50%;
  height: 28%;
  border-left: 1px solid var(--ruler);
}
.ruler-left::before, .ruler-right::before { top: 0; }
.ruler-left::after, .ruler-right::after { bottom: 0; }
.ruler-frame .preview-stage {
  box-shadow: 0 0 0 1px #cfd6dd, 0 10px 28px rgba(20, 32, 43, 0.08);
  background: #fff;
  cursor: pointer;
}
.result-side { display: grid; gap: 12px; align-content: start; }
.dl-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fbfcfe;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.dl-card:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.12);
}
.dl-card strong { display: block; font-size: 16px; }
.dl-card em { color: var(--muted); font-style: normal; font-size: 13px; }
.dl-go { color: var(--blue); font-weight: 800; font-size: 13px; }
.dl-thumb {
  width: 64px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #d7dee4;
  background: #fff;
  display: grid;
  place-items: center;
}
.dl-thumb canvas {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th, .specs td {
  padding: 10px 8px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
}
.specs th { color: var(--muted); font-weight: 650; width: 48%; }
.specs .ok { color: var(--ok); font-weight: 800; }
.swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid #cfd6dd;
  vertical-align: -3px;
  margin-right: 6px;
}
.crop-controls {
  width: 100%;
  max-width: 340px;
  display: grid;
  gap: 10px;
}
.crop-controls label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
}
.crop-controls input[type="range"] { width: 100%; accent-color: var(--blue); }
.bg-pick {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.bg-pick input[type="color"] {
  width: 42px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #fff;
}
.bg-pick input:disabled { opacity: 0.4; }
.result-modal {
  border: 0;
  border-radius: 20px;
  padding: 0;
  width: min(920px, calc(100% - 24px));
  box-shadow: var(--shadow);
  position: relative;
}
.modal-x {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #6b7782;
}
.result-modal::backdrop { background: rgba(20, 32, 43, 0.48); }
.modal-body {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 28px;
  padding: 28px 28px 8px;
  align-items: start;
}
.modal-photo { display: grid; gap: 12px; justify-items: center; }
.modal-specs h2 {
  font-size: 22px;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  max-width: none;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px 24px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 4px;
  min-height: 128px;
}
.card em { color: var(--muted); font-style: normal; font-size: 13px; }
.card b { margin-top: auto; }
.card .go { color: var(--blue); font-weight: 700; font-size: 13px; }

@media (max-width: 1100px) {
  .format-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 18px; }
  .step-grid, .trust, .result, .modal-body { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr 1fr; }
  h1 { max-width: none; }
}
@media (max-width: 860px) {
  .top-inner { flex-wrap: wrap; gap: 10px 12px; padding: 10px 14px; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 14px; }
  .lang { margin-left: auto; }
  #app { padding: 6px 14px 48px; }
  .cta-row { grid-template-columns: 1fr; }
  .pickers { grid-template-columns: 1fr; }
  .format-grid { grid-template-columns: 1fr; }
  .steps-wrap { padding: 20px 14px; }
  .preview-wrap, .upload-pane { min-height: 320px; }
  .ruler-frame { grid-template-columns: 28px minmax(140px, 1fr) 36px; }
  .foot-inner { padding: 24px 14px; }
  .foot-right, .foot-nav, .foot-copy { align-items: flex-start; text-align: left; justify-content: flex-start; }
  .trust { grid-template-columns: 1fr; }
}

/* Articles */
.articles-toolbar { display: grid; gap: 14px; margin: 18px 0 22px; }
.articles-toolbar input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.article-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  content-visibility: auto;
  contain-intrinsic-size: 220px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.article-card:hover { border-color: #c9d7ff; box-shadow: var(--shadow); }
.article-card-cat {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .02em;
}
.article-card strong { font-size: 16px; line-height: 1.35; }
.article-card em {
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-more { color: var(--blue); font-weight: 700; font-size: 13px; margin-top: 4px; }
.articles-count { margin-top: 16px; }
.article-detail .lead, .articles-page .lead, .lead.soft {
  color: var(--muted);
  line-height: 1.55;
  max-width: 70ch;
}
.article-sec { margin: 22px 0; }
.article-sec h2 { font-size: 20px; margin: 0 0 8px; }
.article-sec p { margin: 0; color: #3a4658; line-height: 1.6; }
.article-detail .meta, .crumbs { color: var(--muted); font-size: 13px; }
.article-page.wrap, .article-page { max-width: var(--max); margin: 0 auto; padding: 24px 28px 64px; }
.article-index-list { line-height: 1.7; padding-left: 1.2em; }
.article-index-list a { color: var(--blue); }

@media (max-width: 1100px) {
  .articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .articles-grid { grid-template-columns: 1fr; }
  .nav { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .nav a { white-space: nowrap; }
}
