/* Дизайн-токены — взяты буквально из утверждённого макета (said_founder_audit.html) */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Lora:wght@400;500;600&display=swap");

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201f1d;
  --color-text-muted: #6b6866;
  --color-accent: #b68235;
  --color-accent-dark: #7d5411;
  --color-divider: rgba(32, 31, 29, 0.16);

  --color-red: #8a2f27;
  --color-red-bg: #fbe3e1;
  --color-orange: #d97a3f;
  --color-orange-bg: #fff3e4;
  --color-gold: #b68235;
  --color-gold-bg: #fff3e0;
  --color-green: #4f8a45;
  --color-green-bg: #e5f0e0;

  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Lora", Georgia, serif;

  --radius-lg: 7px;
  --radius-md: 4px;
  --radius-sm: 2px;

  --shadow-sm: 0 1px 2px rgba(45, 43, 43, 0.14);
  --shadow-md: 0 3px 10px rgba(45, 43, 43, 0.16);
  --shadow-lg: 0 12px 32px rgba(45, 43, 43, 0.22);

  --content-width: 720px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; color: var(--color-text); }

a { color: var(--color-accent-dark); }

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-divider);
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand .badge {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  background: var(--color-gold-bg);
  color: var(--color-accent-dark);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
}

.btn-solid {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border: none;
  color: var(--color-accent-dark);
  padding: 13px 0;
}

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.field .hint {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.field select,
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
.field input[type="file"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-accent);
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-text-muted) 50%),
    linear-gradient(135deg, var(--color-text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
  cursor: pointer;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.checkbox-row input { margin-top: 3px; }

.sales-month-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.sales-month-row input[type="month"] {
  flex: 0 0 150px;
  padding: 12px 14px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text);
}
.sales-month-row input[type="file"] { flex: 1; }
.sales-month-row .remove-row {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 8px;
}

.tabs {
  display: inline-flex;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 11px 22px;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--color-text);
}

.tab-btn.active {
  background: var(--color-accent);
  color: #fff;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.checklist { list-style: none; padding: 0; margin: 20px 0; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.92rem;
}
.checklist li::before { content: "✓"; color: var(--color-green); font-weight: 700; }

.steps { display: grid; gap: 16px; margin: 24px 0; }
.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: var(--color-text);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  font-size: 0.92rem;
}
.metric-row .value { font-weight: 700; font-family: var(--font-heading); font-size: 1.1rem; }

.finding-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.finding-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.finding-value { font-family: var(--font-heading); font-size: 2.1rem; font-weight: 600; margin-bottom: 6px; }

.badge-band-red { background: var(--color-red-bg); color: var(--color-red); }
.badge-band-orange { background: var(--color-orange-bg); color: var(--color-orange); }
.badge-band-gold { background: var(--color-gold-bg); color: var(--color-accent-dark); }
.badge-band-green { background: var(--color-green-bg); color: var(--color-green); }

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin: 16px 0;
}
.matrix-table th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  padding: 8px;
  text-align: center;
}
.matrix-table td {
  text-align: center;
  padding: 18px 8px;
  border: 1px solid var(--color-bg);
}
.matrix-table th:first-child, .matrix-table td:first-child {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: left;
  padding-left: 12px;
}

.narrative { font-size: 0.98rem; }
.narrative h2 { font-size: 1.5rem; margin-top: 1.2em; }
.narrative ul { padding-left: 1.3em; }
.narrative li { margin-bottom: 0.4em; }

.progress-ring { display: flex; justify-content: center; margin: 12px 0 24px; }

.locked-list { list-style: none; padding: 0; margin: 16px 0; }
.locked-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-divider);
}
.locked-list li::before { content: "🔒"; font-size: 0.85rem; }

.footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--color-divider);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-box {
  background: var(--color-red-bg);
  color: var(--color-red);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.92rem;
}

.section { padding: 56px 0; }
.section-divider { border: none; border-top: 1px solid var(--color-divider); margin: 0; }

@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  .card { padding: 20px; }
}
