* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 32px 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(180deg, #fdf6ec 0%, #f5ead6 100%);
  font-family: Georgia, "Times New Roman", serif;
  color: #3a3320;
}

/* ---------- конфигуратор ---------- */
.card {
  width: 100%;
  max-width: 680px;
  background: #fffdf7;
  border: 1.5px solid #e6cf9a;
  border-radius: 16px;
  padding: 26px 30px 30px;
  box-shadow: 0 8px 30px rgba(120, 80, 20, 0.1);
}

h1 { margin: 0 0 8px; color: #b8541f; font-size: 27px; line-height: 1.2; }
.hint { margin: 0 0 18px; color: #7a6a42; font-size: 14.5px; line-height: 1.55; }

fieldset { margin: 16px 0 0; padding: 12px 14px; border: 1.5px solid #e6cf9a; border-radius: 10px; }
legend { font-weight: 700; color: #7a5a1a; padding: 0 6px; }
.radio { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 8px 0; cursor: pointer; }
.radio b { color: #9a4e12; }
.radio.standalone { margin: 16px 0 0; }

button[type="submit"] {
  margin-top: 22px; width: 100%; font-family: inherit; font-size: 17px; font-weight: 700;
  padding: 14px; border: none; border-radius: 12px;
  background: linear-gradient(180deg, #f39a3e, #ea7a1e); color: #fff; cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 122, 30, .35);
}
button[type="submit"]:hover { filter: brightness(1.04); }

.online-cta { margin: 18px 0 0; font-size: 14px; color: #7a6a42; text-align: center; }
.online-cta a { color: #b8541f; font-weight: 700; text-decoration: none; }
.online-cta a:hover { text-decoration: underline; }

/* ---------- печатный лист (экранный предпросмотр) ---------- */
.sheet { width: 100%; max-width: 800px; }
body.printing { display: block; padding: 0; background: #fff; }

.page {
  background: #fff; padding: 8mm 6mm; margin: 0 auto 20px; max-width: 800px;
  border: 1px solid #e0d4b0; border-radius: 6px;
}
.sheet-head { text-align: center; border-bottom: 2px solid #eab04a; padding-bottom: 8px; margin-bottom: 10px; }
.sheet-head h1 { font-size: 22px; margin: 0 0 6px; color: #b8541f; }
.meta { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; color: #555; }
.lead { text-align: center; font-size: 12.5px; color: #777; margin: 0 0 12px; }

.cols { display: flex; gap: 14px; }
.col { flex: 1 1 50%; }
.col h2 { font-size: 15px; margin: 0 0 8px; padding: 5px 8px; border-radius: 6px; }
.col-pos h2 { background: #e7f2da; color: #3c6b1e; }
.col-neg h2 { background: #fbe8d6; color: #9a4e12; }
.col ul { list-style: none; margin: 0; padding: 0; }
.col li {
  display: flex; align-items: flex-start; gap: 6px; justify-content: space-between;
  font-size: 11.7px; line-height: 1.3; padding: 4px 0; border-bottom: 1px dotted #e2d6b6;
}
.q-txt { flex: 1 1 auto; }
.crit { color: #b8371f; font-weight: 700; font-size: 10px; white-space: nowrap; }

.tally { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; margin-top: 1px; }
.tally i { width: 12px; height: 12px; border: 1px solid #b09a5c; border-radius: 2px; display: inline-block; }
.tally b { font-size: 11px; color: #b09a5c; margin-left: 1px; }

.ctx-box, .focus-box { margin-top: 12px; border: 1px solid #e0d4b0; border-radius: 8px; padding: 8px 10px; }
.ctx-box h3, .focus-box h3 { font-size: 13px; margin: 0 0 7px; color: #7a5a1a; }
.ctx-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ctx { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: #444; }
.ctx i { width: 12px; height: 12px; border: 1px solid #b09a5c; border-radius: 2px; display: inline-block; }
.write-line { height: 22px; border-bottom: 1px solid #cbb87e; margin: 4px 0; }

/* неделя */
.page-week h2 { font-size: 14px; margin: 12px 0 6px; padding: 4px 8px; border-radius: 6px; }
.h-pos { background: #e7f2da; color: #3c6b1e; }
.h-neg { background: #fbe8d6; color: #9a4e12; }
table.week { width: 100%; border-collapse: collapse; }
table.week th, table.week td { border: 1px solid #d8c89a; font-size: 10px; padding: 3px; text-align: center; }
table.week th.q, table.week td.q { text-align: left; width: 46%; font-weight: 400; line-height: 1.2; }
table.week thead th { background: #f6edd6; color: #7a5a1a; }

/* памятка */
.memo h1 { font-size: 20px; }
.memo h3 { font-size: 14px; color: #7a5a1a; margin: 14px 0 4px; }
.memo p, .memo li { font-size: 12.5px; line-height: 1.5; color: #3a3320; }
.memo ul { margin: 4px 0; padding-left: 20px; }
.memo .foot { margin-top: 14px; font-style: italic; color: #777; }

/* ---------- печать ---------- */
@media print {
  @page { size: A4; margin: 8mm; }
  body { background: #fff; padding: 0; display: block; }
  .card { display: none !important; }
  #sheet { display: block !important; max-width: none; }
  .page { border: none; border-radius: 0; padding: 0; margin: 0; max-width: none; page-break-after: always; }
  .page:last-child { page-break-after: auto; }
}
