:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #637083;
  --line: #d9e1ea;
  --surface: #ffffff;
  --band: #f4f8fb;
  --accent: #147a75;
  --accent-2: #b44b35;
  --focus: #2c6ed5;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--band);
}
a { color: var(--accent); text-decoration: none; }
.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { font-weight: 800; font-size: 20px; color: var(--ink); }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.nav-action { margin: 0; }
.nav-action button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; }
.nav-primary {
  background: var(--accent);
  color: white;
  padding: 9px 13px;
  border-radius: 6px;
}
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px;
  background: #f8fbfd;
}
.language-switch a {
  min-width: 34px;
  text-align: center;
  padding: 6px 8px;
  border-radius: 4px;
  color: var(--muted);
}
.language-switch a.active {
  background: var(--accent);
  color: #fff;
}
.language-switch .language-selector { width: auto; max-width: 180px; min-height: 32px; padding: 4px 8px; border: 0; background: transparent; font-size: 13px; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 64px; }
.hero {
  min-height: 360px;
  display: flex;
  align-items: center;
  padding: 48px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.96), rgba(255,255,255,.72)),
    url("/static/theme/img/home-bg.jpg") center/cover;
  border: 1px solid var(--line);
}
.hero.compact { min-height: 220px; }
.hero h1, .split h1, .article h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}
.hero p, .split p { max-width: 620px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.eyebrow { color: var(--accent-2); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: 0; }
.button, button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}
.button.secondary {
  background: #e8f1f4;
  color: var(--ink);
}
.button.disabled {
  background: #eef2f6;
  color: var(--muted);
  cursor: default;
}
.actions, .pagination, .panel-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.actions { margin-top: 18px; }
.panel-head {
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-head h2 { margin: 0; }
.pagination.bottom { margin-top: 18px; }
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.card, .panel, .form, .article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.card { padding: 22px; }
.card h2 { margin: 0 0 10px; font-size: 20px; }
.card p, .muted { color: var(--muted); line-height: 1.55; }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 32px;
  align-items: start;
}
.split.wide { grid-template-columns: minmax(0, 1.1fr) minmax(320px, 480px); }
.form { padding: 24px; display: grid; gap: 16px; }
.funds-form { display: grid; gap: 16px; }
label { display: grid; gap: 8px; font-weight: 700; font-size: 14px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  padding: 10px 12px;
  font: inherit;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.panel { padding: 24px; margin-top: 24px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.truncate { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-block {
  margin: 0;
  max-height: 560px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f172a;
  color: #e5edf7;
  padding: 14px;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.notice { margin: 0 0 18px; padding: 12px 14px; border-radius: 6px; background: #e8f5f1; border: 1px solid #b7d8cc; }
.notice.error { background: #fff0ee; border-color: #efc2bc; }
.list { display: grid; gap: 10px; margin-top: 20px; }
.list-row { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; }
.article { padding: 40px; }
.article-body { line-height: 1.75; color: #2d3745; }
.policy-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.policy-nav [aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }
.policy-document { max-width: 880px; margin: 28px auto 0; overflow-wrap: anywhere; }
.policy-document h1 { font-size: 32px; line-height: 1.25; margin: 0 0 24px; }
.policy-document h2 { font-size: 23px; line-height: 1.4; margin: 32px 0 12px; }
.policy-document h3 { font-size: 19px; line-height: 1.5; margin: 24px 0 10px; }
.policy-document li { margin-block: 10px; }
.api-document { max-width: 960px; margin: 0 auto; }
.api-document h1 { font-size: 32px; margin: 0 0 16px; }
.api-document h2 { font-size: 23px; margin: 32px 0 12px; }
.api-document pre { background: #edf2f5; padding: 16px; overflow-x: auto; line-height: 1.6; border: 1px solid var(--line); border-radius: 4px; }
.api-document code { overflow-wrap: anywhere; }
.api-document .table-wrap { margin-block: 16px; }
.footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 24px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.app-promotion { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; margin-bottom: 24px; border-top: 2px solid var(--accent); border-bottom: 1px solid var(--line); }
.app-promotion-copy { flex: 1; min-width: 0; }
.app-promotion h2 { font-size: 24px; margin: 8px 0; line-height: 1.3; }
.app-promotion p { margin: 6px 0; line-height: 1.55; }
.app-promotion-note { color: var(--muted); font-size: 14px; }
.app-promotion-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex-shrink: 0; }
.free-like-side .app-promotion { margin: 0; padding: 0 0 20px; border-top: 0; flex-direction: column; align-items: stretch; gap: 12px; }
.free-like-side .app-promotion-actions { align-items: stretch; }
.task-hall-intro h1 { font-size: 32px; margin: 8px 0 16px; line-height: 1.25; }
.task-hall-intro p { line-height: 1.6; color: var(--muted); }
.task-hall-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 28px 0; padding: 24px 0; border-block: 1px solid var(--line); }
.task-hall-summary dt { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.task-hall-summary dd { margin: 0; font-size: 24px; font-weight: 700; overflow-wrap: anywhere; }
.task-hall-summary dd span { font-size: 14px; font-weight: 400; }
.task-hall-list { margin-bottom: 28px; }
.task-hall-table { background: var(--surface); }
.task-hall-table th, .task-hall-table td { white-space: nowrap; }
.task-hall-how { padding: 8px 0; }
.task-hall-how li { margin: 12px 0; line-height: 1.6; }
@media (max-width: 640px) {
  .app-promotion { flex-direction: column; align-items: stretch; gap: 14px; }
  .app-promotion h2 { font-size: 22px; }
  .app-promotion-actions { align-items: stretch; }
  .task-hall-summary { grid-template-columns: 1fr; gap: 18px; }
}

.free-like-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 28px;
  align-items: stretch;
}
.free-like-main, .free-like-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.free-like-main { padding: 42px; }
.free-like-main h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}
.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}
.free-like-form {
  margin-top: 26px;
  box-shadow: none;
}
.free-like-form [hidden] { display: none !important; }
.free-like-layout [hidden] { display: none !important; }
.free-like-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8fbfd;
}
.choice input { width: auto; min-height: auto; }
.free-like-side {
  display: grid;
  gap: 18px;
  padding: 24px;
}
.phone-preview {
  min-height: 360px;
  border-radius: 28px;
  border: 1px solid #cdd7e2;
  background: #111827;
  padding: 18px;
}
.flow-table { min-width: 940px; }
.flow-table td {
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}
.flow-table td:nth-child(2) { min-width: 250px; }
.flow-table td:nth-child(3), .flow-table td:nth-child(4) { min-width: 100px; }
.flow-table td:last-child { min-width: 240px; }
.phone-bar {
  width: 84px;
  height: 8px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: #374151;
}
.post-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.post-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
}
.tone-a { background: #e8796b; }
.tone-b { background: #6fb7b2; }
.tone-c { background: #e9c46a; }
.tone-d { background: #7c9ccf; }
.engagement-row {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.engagement-row span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f9fafb;
}
.free-like-facts h2 { margin: 0 0 12px; }
.free-like-facts ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}
.free-like-cards { margin-top: 24px; }
.free-like-status,
.free-like-account,
.free-like-countdown {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}
.free-like-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
}
.free-like-status h2,
.free-like-countdown h2 {
  margin: 0 0 6px;
  font-size: 18px;
}
.free-like-status p,
.free-like-countdown p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.free-like-status.error {
  display: block;
  background: #fff0ee;
  border-color: #efc2bc;
  color: #8d2f20;
  font-weight: 700;
}
.status-spinner {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 3px solid #cbd5df;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.free-like-account { padding: 18px; }
.account-head.without-picture { grid-template-columns: minmax(0, 1fr); }
.account-head > div { min-width: 0; overflow-wrap: anywhere; }
.account-head {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.account-head img {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  background: #d9e1ea;
}
.account-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
}
.account-head p { margin: 0 0 4px; }
.account-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.account-stats span {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}
.account-stats b {
  color: var(--ink);
  font-size: 18px;
}
.free-like-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.free-like-actions button:disabled,
.free-like-countdown button:disabled {
  opacity: .58;
  cursor: not-allowed;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.post-option {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: #d9e1ea;
}
.post-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-option.selected {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(180, 75, 53, .22);
}
.free-like-countdown {
  padding: 18px;
  display: grid;
  gap: 12px;
}
.free-like-countdown a { font-weight: 700; }

.support-page h1 { font-size: 28px; line-height: 1.3; overflow-wrap: anywhere; }
.support-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
.support-layout.admin { grid-template-columns: minmax(0, 1fr); }
.support-form { display: grid; gap: 16px; align-content: start; }
.support-form h2 { margin: 0; font-size: 20px; }
.support-form label { display: grid; gap: 6px; }
.support-form button { justify-self: start; }
.support-message { padding: 18px 0; border-bottom: 1px solid var(--line); }
.support-message.staff { border-left: 3px solid var(--accent); padding-left: 16px; }
.support-message time { color: var(--muted); font-size: 13px; }
.support-message p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.reply-form { margin-top: 24px; max-width: 720px; }
.recovery-page { max-width: 480px; margin: 0 auto; }

@media (max-width: 800px) {
  .support-layout { grid-template-columns: minmax(0, 1fr); }
  .topbar { align-items: flex-start; flex-direction: column; padding: 16px; }
  .nav { gap: 10px; }
  .hero { min-height: 300px; padding: 28px; }
  .grid, .split, .split.wide, .free-like-layout { grid-template-columns: 1fr; }
  .free-like-main { padding: 28px; }
  .free-like-options { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-stats { grid-template-columns: 1fr; }
}
