* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --text: #1a1a2e;
  --text-secondary: #333;
  --text-muted: #666;
  --bg: #f8f9fa;
  --card: #ffffff;
  --border: #ddd;
  --table-header: #f0f0f5;
  --highlight-bg: #fff8e1;
  --highlight-border: #f59e0b;
  --requisites-bg: #f8f9fa;
  --link: #3b82f6;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --feature-bg: #f0f4ff;
  --btn-primary: #3b82f6;
  --btn-primary-hover: #2563eb;
  --btn-secondary: #6b7280;
  --btn-secondary-hover: #4b5563;
}

/* Логотип-заголовок: показываем вариант под текущую тему (SVG в <img> не видит
   css-переменных страницы, поэтому два файла, а не перекраска одного). */
h1.brand { line-height: 0; margin-bottom: 12px; }
h1.brand img { width: 210px; max-width: 64vw; height: auto; }
h1.brand .on-dark { display: none; }
[data-theme="dark"] h1.brand .on-light { display: none; }
[data-theme="dark"] h1.brand .on-dark { display: inline-block; }

[data-theme="dark"] {
  --text: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --bg: #0f172a;
  --card: #1e293b;
  --border: #334155;
  --table-header: #1a2435;
  --highlight-bg: #2a2000;
  --highlight-border: #f59e0b;
  --requisites-bg: #162032;
  --link: #60a5fa;
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
  --feature-bg: #1a2744;
  --btn-primary: #3b82f6;
  --btn-primary-hover: #60a5fa;
  --btn-secondary: #4b5563;
  --btn-secondary-hover: #6b7280;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  position: relative;
}

h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text);
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 14px;
}

h2 {
  font-size: 18px;
  margin: 28px 0 12px;
  color: var(--text);
}

p, li {
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

ol, ul {
  padding-left: 24px;
}

ol > li {
  margin-bottom: 6px;
}

.section {
  margin-bottom: 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

th, td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  color: var(--text-secondary);
}

th {
  background: var(--table-header);
  font-weight: 600;
  color: var(--text);
}

.highlight {
  background: var(--highlight-bg);
  border-left: 4px solid var(--highlight-border);
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
}

.requisites {
  background: var(--requisites-bg);
  padding: 20px;
  border-radius: 8px;
  margin-top: 16px;
}

.requisites p {
  margin-bottom: 4px;
  font-size: 14px;
}

.date {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 32px;
}

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

/* About page specific */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.feature {
  background: var(--feature-bg);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.plans td:nth-child(2),
.plans td:nth-child(3),
.plans th:nth-child(2),
.plans th:nth-child(3) {
  text-align: center;
}

.docs {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.doc-link {
  display: inline-block;
  padding: 12px 24px;
  background: var(--btn-primary);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.doc-link:hover {
  background: var(--btn-primary-hover);
}

.doc-link.secondary {
  background: var(--btn-secondary);
}

.doc-link.secondary:hover {
  background: var(--btn-secondary-hover);
}

/* Theme toggle */
.theme-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s;
}

.theme-btn:hover {
  background: var(--requisites-bg);
}

@media (max-width: 600px) {
  .container { padding: 20px 16px; }
  h1 { font-size: 20px; }
  h2 { font-size: 16px; }
  .features { grid-template-columns: 1fr; }
  .docs { flex-direction: column; }
}
