/* ===== Сброс и базовая типографика ===== */
* { box-sizing: border-box; }

:root {
  --bg: #faf7f2;            /* тёплый светлый фон */
  --surface: #ffffff;
  --surface-2: #f3efe8;
  --text: #1f1b16;
  --muted: #6b6357;
  --accent: #c75b3a;        /* тёплый терракотовый */
  --accent-2: #d4a017;      /* горчичный */
  --success: #2f7a5c;
  --danger: #b83a2a;
  --warning: #c9932a;
  --radius: 20px;
  --shadow: 0 6px 24px rgba(40, 30, 20, 0.08);
  --shadow-hover: 0 12px 36px rgba(40, 30, 20, 0.14);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Контейнер ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* ===== Шапка ===== */
.header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: sticky; top: 0; z-index: 100;
}
.header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo { font-weight: 700; font-size: 18px; color: var(--text); }
.nav-links a {
  margin-left: 20px;
  color: var(--text);
  font-size: 15px;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* ===== Кнопки ===== */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none !important;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-secondary { background: var(--surface-2); color: var(--text) !important; }
.btn-success { background: var(--success); }
.btn-small { padding: 8px 16px; font-size: 14px; }

/* ===== Флеш-сообщения ===== */
.flash {
  padding: 12px 18px;
  border-radius: 12px;
  margin-bottom: 12px;
  background: var(--surface-2);
}
.flash-error { background: #fce8e5; color: var(--danger); }
.flash-success { background: #e6f4ec; color: var(--success); }
.flash-info { background: #e8eef4; color: #2c4a6b; }

/* ============================================ */
/*                    БЕНТО                     */
/* ============================================ */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.tile {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.tile-hero      { grid-column: span 8; grid-row: span 2; }
.tile-hero-side { grid-column: span 4; }
.tile-wide      { grid-column: span 12; }
.tile-half      { grid-column: span 6; }
.tile-third     { grid-column: span 4; }
.tile-quarter   { grid-column: span 3; }

.tile h1, .tile h2, .tile h3 { margin-top: 0; }
.tile h1 { font-size: 34px; line-height: 1.15; }
.tile h2 { font-size: 22px; }
.tile h3 { font-size: 17px; }

.tile-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.tile-accent a { color: #fff; text-decoration: underline; }
.tile-soft { background: var(--surface-2); }

.tile-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.tile-accent .tile-label { color: rgba(255,255,255,0.85); }

/* ===== Кружки-палитры ===== */
.palette {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.swatch {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  font-size: 11px;
  color: #fff;
  padding: 8px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.45);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
}
.swatch-sm { width: 64px; height: 64px; font-size: 10px; }

/* ===== Признаки (5 карточек) ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.feature {
  background: var(--surface-2);
  border-radius: 16px;
  padding: 20px;
}
.feature-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

/* ===== Карточки сезонов (для главной) ===== */
.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.season-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 18px;
  text-decoration: none !important;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex; flex-direction: column; gap: 8px;
}
.season-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.season-card-title { font-weight: 600; font-size: 15px; }
.season-card-summary { font-size: 13px; color: var(--muted); }
.season-card-dots { display: flex; gap: 4px; margin-top: auto; }
.season-dot { width: 18px; height: 18px; border-radius: 50%; }

/* ===== Таблица подтипов ===== */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}
.compare-table th, .compare-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  vertical-align: top;
}
.compare-table th { background: var(--surface-2); font-weight: 600; }

/* ===== FAQ ===== */
.faq details {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 0; color: var(--muted); }

/* ===== Кабинет / таблицы ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
table.orders {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.orders th, table.orders td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
table.orders th { background: var(--surface-2); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: #e6f4ec; color: var(--success); }
.badge-warning { background: #fbf2dd; color: var(--warning); }
.badge-danger  { background: #fce8e5; color: var(--danger); }

.muted { color: var(--muted); }

/* ===== Футер ===== */
.footer {
  padding: 24px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid rgba(0,0,0,0.05);
  margin-top: 40px;
}
label.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
label.checkbox input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
label.checkbox a {
  color: var(--accent);
  text-decoration: underline;
}
.report-text {
  white-space: pre-wrap;   /* переносить по ширине */
  word-wrap: break-word;   /* длинные слова тоже переносить */
  overflow-wrap: anywhere; /* на всякий случай */
  max-width: 100%;
  font-family: inherit;    /* не monospace — легче читать */
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

/* ===== Адаптив ===== */
@media (max-width: 900px) {
  .tile-hero { grid-column: span 12; }
  .tile-hero-side { grid-column: span 12; }
  .tile-half, .tile-third, .tile-quarter { grid-column: span 12; }
}
@media (max-width: 560px) {
  .tile { padding: 18px; }
  .tile h1 { font-size: 26px; }
  .swatch { width: 72px; height: 72px; }
}