/* SQN / tips.sqn-law.ru — светлый editorial */
:root {
  --bg: #FAFAF9;
  --text: #1A1A1A;
  --muted: #6B6B6B;
  --accent: #8F0F0F;
  --border: #E5E4E2;
  --card: #FFFFFF;
  --field: #F1F0EE;
  --field-focus: #FFFFFF;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

/* ---------- шапка ---------- */
.sitehead {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand:hover .wordmark { color: var(--accent); }
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}
.wordmark {
  font-family: 'Prompt', 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
  transition: color .12s ease;
}
.sitehead .tag {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .02em;
}
h1 {
  font-weight: 600;
  font-size: 34px;
  letter-spacing: -.01em;
  margin: 4px 0 6px;
}
.lead {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 28px;
  max-width: 560px;
}

/* ---------- каркас калькулятора ---------- */
.calc {
  display: grid;
  grid-template-columns: 1fr 330px 1fr;
  gap: 32px;
  align-items: start;
}

/* ---------- колонка даты ---------- */
.pick-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.date-input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 6px;
  text-align: center;
  letter-spacing: .02em;
  margin-bottom: 14px;
}
.date-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* календарь */
.calendar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cal-title {
  font-weight: 600;
  font-size: 15px;
}
.cal-nav { display: flex; gap: 4px; }
.cal-nav button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.cal-nav button:hover { background: var(--field); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-dow {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 0;
  font-weight: 600;
}
.cal-day {
  text-align: center;
  padding: 7px 0;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  transition: background .1s ease, color .1s ease;
}
.cal-day:hover { background: var(--field); }
.cal-day.out { color: #C8C6C3; cursor: default; }
.cal-day.out:hover { background: transparent; }
.cal-day.weekend { color: var(--muted); }
.cal-day.holiday { color: var(--accent); }
.cal-day.today { box-shadow: inset 0 0 0 1px var(--accent); }
.cal-day.selected {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ---------- центральная колонка (итоги) ---------- */
.totals { display: flex; flex-direction: column; padding-top: 2px; }
.totals .group {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.totals .group:first-child { padding-top: 0; }
.totals .group-head {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.field-row:last-child { margin-bottom: 0; }

.num-input {
  width: 68px;
  border: 1px solid var(--border);
  background: var(--field);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  padding: 7px 8px;
  border-radius: 6px;
  text-align: center;
  -moz-appearance: textfield;
}
.num-input::-webkit-outer-spin-button,
.num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--field-focus);
}
.unit { font-size: 13px; color: var(--muted); white-space: nowrap; }
.unit.working { color: var(--accent); }

.include-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  user-select: none;
}
.include-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.anchor-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ---------- SEO-контент ---------- */
.seo {
  margin-top: 48px;
  max-width: 720px;
}
.seo h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 32px 0 10px;
  letter-spacing: -.01em;
}
.seo p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 6px;
}
.faq { border-top: 1px solid var(--border); margin-top: 16px; }
.faq-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.faq-item h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
}
.faq-item p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.7;
}

/* ---------- футер ---------- */
.foot {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

/* ---------- админка ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
table.tbl th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tag {
  display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px;
  font-weight: 600;
}
.tag.off { background: #F4E7E7; color: var(--accent); }
.tag.working { background: #E8EFE8; color: #356A3A; }

button.btn, a.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
button.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
button.btn.sm { padding: 6px 12px; font-size: 13px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .yr { display: flex; gap: 8px; align-items: center; }

.note { background: #FBF8F3; border: 1px solid #ECE5D8; border-radius: 8px; padding: 12px 14px; font-size: 13px; color: var(--muted); }

@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; gap: 24px; }
  .totals { order: -1; }
  h1 { font-size: 26px; }
}