:root {
  --bg: #f6f7fb;
  --txt: #1c2333;
  --mut: #5c6478;
  --acc: #2957d9;
  --acc-d: #1e42ab;
  --line: #e3e7f0;
  --card: #fff;
  --r: 12px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

a { color: var(--acc); }

h1 { font-size: 26px; line-height: 1.25; margin: 18px 0 10px; }
h2 { font-size: 20px; line-height: 1.3; margin: 0 0 12px; }

/* ---------- header ---------- */
.hd { background: #fff; border-bottom: 1px solid var(--line); }
.hd__in { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
.hd__logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 19px; color: var(--txt); text-decoration: none; }
.hd__mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--acc); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.hd__dot { color: var(--acc); }
.hd__scr { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.hd__scr a {
  padding: 5px 12px; font-size: 14px; text-decoration: none;
  color: var(--mut); background: #fff; white-space: nowrap;
}
.hd__scr a.is-on { background: var(--acc); color: #fff; }

/* ---------- crumb ---------- */
.crumb { font-size: 13px; color: var(--mut); margin: 14px 0 0; }
.crumb a { color: var(--mut); text-decoration: none; }
.crumb a:hover { color: var(--acc); }
.crumb span { margin: 0 4px; }

.lead { color: var(--mut); font-size: 17px; margin: 0 0 18px; }

/* ---------- generator ---------- */
.gen { display: grid; gap: 18px; margin: 18px 0 8px; }

.gen__h { font-size: 17px; margin: 0 0 10px; }

.gen__form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  align-self: start;
}

.fld { margin-bottom: 12px; }
.fld label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.fld input, .fld textarea {
  width: 100%;
  border: 1px solid #ccd3e0;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 15px;
  color: var(--txt);
  background: #fff;
}
.fld textarea { min-height: 84px; resize: vertical; }
.fld input:focus, .fld textarea:focus { outline: 2px solid var(--acc); outline-offset: -1px; border-color: var(--acc); }
.fld input::placeholder, .fld textarea::placeholder { color: #a7afc2; }
.fld small { display: block; color: var(--mut); font-size: 12px; margin-top: 3px; }

/* ---------- paper ---------- */
.paper {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 2px 14px rgba(28, 35, 51, .08);
  padding: 34px 38px;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 15.5px;
  line-height: 1.5;
  overflow-x: auto;
}
.ln { min-height: 1.4em; white-space: pre-wrap; }
.ln-r { text-align: right; }
.ln-c { text-align: center; }
.tab { display: inline-block; width: 2.4em; }
.ph { color: #8a93a8; }
.vl { color: var(--txt); }

/* ---------- actions ---------- */
.gen__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn {
  border: 0; border-radius: 9px; cursor: pointer;
  padding: 10px 16px; font: inherit; font-size: 14.5px; font-weight: 600;
  background: var(--acc); color: #fff;
}
.btn:hover { background: var(--acc-d); }
.btn--g { background: #e9edf7; color: var(--acc-d); }
.btn--g:hover { background: #dde3f3; }
.gen__msg { min-height: 1.2em; font-size: 13.5px; color: #1d7a3d; margin: 8px 0 0; }
.hint { font-size: 13px; color: var(--mut); margin: 10px 0 0; }

/* ---------- sections ---------- */
.sec { margin: 30px 0; }
.steps { margin: 0; padding-left: 22px; }
.steps li { margin-bottom: 8px; }
.body p { margin: 0 0 12px; }
.body ul { padding-left: 22px; }
.body li { margin-bottom: 6px; }

.faq {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  margin-bottom: 8px;
}
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; font-size: 15px; }
.faq p { margin: 0 0 12px; color: var(--mut); }

/* ---------- cards ---------- */
.cards { display: grid; gap: 10px; grid-template-columns: 1fr; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
  text-decoration: none;
  display: block;
}
.card:hover { border-color: var(--acc); }
.card b { display: block; color: var(--txt); font-size: 15px; }
.card span { color: var(--mut); font-size: 13px; }

/* ---------- home ---------- */
.hero { padding: 26px 0 8px; }
.hero h1 { font-size: 30px; margin: 0 0 10px; }
.hero p { color: var(--mut); font-size: 17px; max-width: 640px; margin: 0; }
.grp { margin: 26px 0; }
.grp h2 { font-size: 18px; margin-bottom: 10px; }

/* ---------- footer ---------- */
.ft { border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 0 30px; background: #fff; }
.ft p { margin: 0 0 6px; font-size: 14px; color: var(--mut); }
.ft__disc { font-size: 12.5px; }

/* ---------- desktop ---------- */
@media (min-width: 860px) {
  h1 { font-size: 30px; }
  .gen { grid-template-columns: 340px 1fr; align-items: start; }
  .gen__form { order: 1; position: sticky; top: 16px; }
  .gen__out { order: 2; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .paper { min-height: 420px; }
}
@media (min-width: 560px) and (max-width: 859px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- print: только бумага ---------- */
@media print {
  body { background: #fff; }
  .hd, .crumb, .gen__form, .gen__acts, .gen__msg, .hint, .sec, .ft, .lead, h1 { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .paper {
    border: 0; box-shadow: none; border-radius: 0;
    padding: 0; overflow: visible;
    font-size: 13pt;
  }
  .ph { color: #000; }
}
