:root { --navy: #13306b; --navy-dark: #0c2150; --ring: #f59e0b; }
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 18px; line-height: 1.6; color: #0f172a; background: #f6f8fc; overflow-x: hidden; }
  [hidden] { display: none !important; }

  /* Фокус: заметная рамка 3 px */
  :focus { outline: none; }
  :focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 10px; }

  /* Рекламные слоты */
  .ad-slot { position: relative; display: flex; align-items: center; justify-content: center; margin-left: auto; margin-right: auto; width: 100%; }
  .ad-slot::before { content: attr(data-label); position: absolute; top: -22px; left: 0; font-size: 12px; color: #64748b; letter-spacing: .04em; text-transform: uppercase; }
  .ad-top, .ad-footer { max-width: 1120px; min-height: 90px; }
  .ad-pre-result { max-width: 336px; min-height: 250px; }
  .ad-sidebar { width: 300px; min-height: 600px; }
  @media (max-width: 639px) {
    .ad-top, .ad-footer { max-width: 100%; min-height: 100px; }
    .ad-pre-result { max-width: 300px; }
  }
  body.debug .ad-slot { outline: 2px dashed #94a3b8; background: repeating-linear-gradient(45deg, #f1f5f9, #f1f5f9 10px, #e2e8f0 10px, #e2e8f0 20px); }
  body.debug .ad-slot::after { content: attr(data-size); color: #475569; font-size: 14px; }

  /* Карточки каталога */
  .tool-card { transition: box-shadow .15s, border-color .15s, transform .15s; }
  .tool-card:hover { box-shadow: 0 8px 24px rgba(15, 33, 80, .10); border-color: #9fb3dc; transform: translateY(-1px); }
  .tool-card[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
  .tool-card[aria-disabled="true"]:hover { box-shadow: none; transform: none; border-color: #e2e8f0; }

  /* Выпадающий список страны/языка */
  .listbox { max-height: 320px; overflow-y: auto; }
  .listbox [role="option"][aria-selected="true"] { background: #dce6f6; font-weight: 600; }
  .listbox [role="option"].active { outline: 3px solid var(--ring); outline-offset: -3px; }

  /* Поля формы */
  .field-input { width: 100%; min-height: 52px; border: 2px solid #94a3b8; border-radius: 12px; padding: 10px 14px; font-size: 18px; background: #fff; color: #0f172a; }
  .field-input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(19, 48, 107, .2); }
  .field-input[aria-invalid="true"] { border-color: #b91c1c; }
  textarea.field-input { min-height: 120px; resize: vertical; padding-right: 64px; }
  .flash { animation: flash 1.5s ease-out; }
  @keyframes flash { 0% { background: #fef3c7; } 100% { background: #fff; } }

  /* Микрофон */
  .mic-btn.listening { background: #b91c1c; color: #fff; border-color: #b91c1c; }
  .mic-btn.listening::after { content: ''; position: absolute; inset: -6px; border-radius: 999px; border: 3px solid #b91c1c; animation: pulse 1.2s infinite; }
  @keyframes pulse { 0% { opacity: 1; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.3); } }

  /* Лист документа */
  .paper-wrap { background: #e5e9f0; border-radius: 16px; padding: 24px; }
  .paper { background: #fff; max-width: 794px; margin: 0 auto; padding: 56px 56px 56px 84px; box-shadow: 0 4px 24px rgba(15, 23, 42, .15); font-family: 'Times New Roman', Times, serif; font-size: 17px; line-height: 1.5; color: #000; }
  .paper .doc-body:focus { outline: 2px dashed #9fb3dc; outline-offset: 8px; }
  .paper h1 { font-size: 20px; font-weight: 700; text-align: center; text-transform: uppercase; margin: 8px 0 4px; }
  .paper h2 { font-size: 17px; font-weight: 700; margin: 18px 0 6px; }
  .paper p { margin: 0 0 8px; text-align: justify; }
  .paper p.c { text-align: center; }
  .paper p.r { text-align: right; }
  .paper p.org { text-align: center; font-weight: 700; margin-bottom: 14px; }
  .paper ul, .paper ol { margin: 0 0 10px 24px; }
  .paper ul { list-style: disc; } .paper ol { list-style: decimal; }
  .paper li { margin-bottom: 4px; }
  .paper table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 15px; }
  .paper th, .paper td { border: 1px solid #000; padding: 5px 7px; vertical-align: top; text-align: left; }
  .paper th { background: #f1f5f9; font-weight: 700; }
  .paper .doc-sign { margin-top: 28px; }
  .paper .doc-sign p { text-align: left; margin-bottom: 10px; }
  .paper .doc-photos { margin-top: 24px; }
  .paper .doc-photos figure { display: inline-block; width: calc(50% - 10px); margin: 0 8px 12px 0; vertical-align: top; }
  .paper .doc-photos img { width: 100%; border: 1px solid #94a3b8; }
  .paper .doc-photos figcaption { font-size: 14px; text-align: center; }
  .letterhead img { display: block; max-width: 100%; margin: 0 auto 18px; }
  @media (max-width: 639px) {
    .paper-wrap { padding: 8px; border-radius: 12px; }
    .paper { padding: 20px 16px; font-size: 16px; }
    .paper p { text-align: left; }
    .paper .doc-photos figure { width: 100%; }
  }

  /* Печать: только лист документа */
  @media print {
    @page { size: A4; margin: 20mm 15mm 20mm 30mm; }
    body { background: #fff; }
    body * { visibility: hidden; }
    #paper, #paper * { visibility: visible; }
    #paper { position: absolute; left: 0; top: 0; width: 100%; max-width: none; box-shadow: none; padding: 0; margin: 0; }
    .no-print { display: none !important; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  }
  .ad-slot.ad-off { display: none; }
  body.debug .ad-slot.ad-off { display: flex; }

  /* SEO-текст на страницах инструментов */
  .seo-article h2 { font-size: 24px; font-weight: 700; color: #0c2150; margin: 28px 0 10px; line-height: 1.3; }
  .seo-article h2:first-child { margin-top: 0; }
  .seo-article p { margin: 0 0 14px; }
  .seo-article ul { list-style: disc; margin: 0 0 14px 24px; }
  .seo-article ol { list-style: decimal; margin: 0 0 14px 24px; }
  .seo-article li { margin-bottom: 6px; }
  .seo-article a, .seo-links a { color: #13306b; text-decoration: underline; }
  .seo-faq { border: 2px solid #e2e8f0; border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; }
  .seo-faq summary { cursor: pointer; font-weight: 600; min-height: 32px; }
  .seo-faq p { margin: 8px 0 0; }
  .seo-note { margin-top: 20px; font-size: 16px; color: #475569; }
  .seo-links h2 { font-size: 22px; font-weight: 700; color: #0c2150; margin-bottom: 12px; }
  .seo-links h3 { font-weight: 700; margin-bottom: 6px; }
  .seo-links li { margin-bottom: 8px; }