:root {
  --bg: #f3efe4;
  --ink: #1c2b26;
  --muted: #5c6b64;
  --line: #e4ddd0;
  --card: #fffdf8;
  --accent: #0e8f78;
  --accent-deep: #0b6e5e;
  --accent-ink: #f4fbf8;
  --peach: #f6e3cf;
  --sun: #f4e7b8;
  --rose: #f0d5d8;
  --warn: #9a4d2a;
  --warn-bg: #fbeee4;
  --shadow: 0 12px 32px rgba(48, 42, 28, 0.06);
  color: var(--ink);
  background:
    radial-gradient(920px 460px at 110% -8%, var(--peach) 0%, transparent 58%),
    radial-gradient(760px 420px at -12% -6%, #d7efe6 0%, transparent 55%),
    var(--bg);
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--accent-deep); }
code, textarea, input, button, .button, table { font-family: inherit; }
h1, h2, .mark { font-family: Fraunces, Georgia, serif; font-weight: 560; letter-spacing: -0.02em; }

.top, main { width: min(980px, calc(100% - 32px)); margin: 0 auto; }
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0 8px;
  flex-wrap: wrap;
}
.mark { color: var(--ink); text-decoration: none; font-size: 26px; margin-right: auto; }
nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
nav a { color: var(--ink); text-decoration: none; }
.langs { display: flex; gap: 4px; }
.langs a {
  min-width: 40px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.langs a.on { background: var(--ink); color: #fffdf8; }

main { padding-bottom: 80px; }
h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.08; margin: 0 0 12px; }
h2 { font-size: 26px; margin: 0 0 8px; }
.lead { font-size: 18px; max-width: 40rem; color: var(--ink); }
.eyebrow { color: var(--accent-deep); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 13px; }
.meta, .hint, .note { color: var(--muted); }
.hero { padding: 36px 0 8px; }

.tools { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 22px; }
.tools li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.tools li:nth-child(1) { background: #e7f6f1; }
.tools li:nth-child(2) { background: var(--sun); }
.tools li:nth-child(3) { background: var(--peach); }
.tools li:nth-child(4) { background: var(--rose); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0; }
.grid.two { grid-template-columns: 1fr 1fr; }
.card, .note, .flash {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
}
.note { background: rgba(255, 253, 248, 0.72); box-shadow: none; }
.flash { background: var(--warn-bg); color: var(--warn); }
.story {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 8px;
  box-shadow: var(--shadow);
}
.story p { font-size: 18px; max-width: 42rem; }
.tiers td:last-child, .tiers th:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tiers tr:first-child th { color: var(--muted); font-weight: 600; }
.price { font-family: Fraunces, Georgia, serif; font-size: 28px; margin: 12px 0 0; }
.price span, .hint { display: block; font-size: 14px; color: var(--muted); font-family: Outfit, sans-serif; font-weight: 400; }

.steps { list-style: none; padding: 0; display: grid; gap: 10px; }
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  background: rgba(255, 253, 248, 0.8);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}
.steps span {
  font-family: Fraunces, Georgia, serif;
  color: var(--accent-deep);
  font-size: 22px;
}
.steps p { margin: 0; }

.button, button {
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  min-height: 44px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
}
.button:hover, button:hover { background: var(--accent-deep); }
button.link { background: transparent; color: var(--muted); min-height: 0; padding: 8px 0; font-weight: 500; }
button.link:hover { background: transparent; color: var(--ink); }
.button.wide { display: flex; width: 100%; margin: 12px 0; }
.narrow { max-width: 480px; }
.split, .row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }
.grow { flex: 1; min-width: 180px; }
label { display: grid; gap: 6px; font-size: 14px; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 12px;
  color: var(--ink);
  font-size: 16px;
}
textarea { resize: vertical; }
input:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
fieldset { border: 1px solid var(--line); border-radius: 16px; padding: 8px 14px 12px; background: var(--card); }
legend { padding: 0 6px; font-weight: 600; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; }
.choice input { width: auto; margin-top: 4px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.list a { color: var(--ink); text-decoration: none; display: grid; gap: 2px; }
.list.compact code { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; color: var(--muted); }
.telegram { margin-top: 18px; }
.danger { margin-top: 28px; }
.danger button { background: transparent; color: var(--warn); border: 1px solid var(--warn); }
.danger button:hover { background: var(--warn-bg); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
section { margin: 26px 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }
pre {
  white-space: pre-wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.progress { display: flex; gap: 8px; list-style: none; padding: 0; margin: 8px 0 18px; }
.progress li {
  width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--muted); font-weight: 600;
}
.progress li.on { background: var(--ink); color: #fffdf8; border-color: var(--ink); }
.progress li.done { background: #e7f6f1; color: var(--accent-deep); }
.names { display: flex; flex-wrap: wrap; gap: 8px; }
.names button { background: var(--sun); color: var(--ink); }
input[type="range"] {
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--accent);
}
.meter { height: 10px; background: var(--line); border-radius: 99px; margin: 8px 0; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.table-wrap button { min-height: 36px; }
.preview { font-size: 18px; word-break: break-all; }
.price { font-family: Fraunces, Georgia, serif; font-size: 32px; margin: 8px 0; }
.tabs { display: flex; gap: 8px; margin: 12px 0; }
.tabs button { background: var(--peach); color: var(--ink); }
fieldset { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
legend { padding: 0 6px; }
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  width: min(420px, calc(100% - 32px));
  padding: 20px;
}
dialog::backdrop { background: rgba(28, 43, 38, 0.35); }
dialog form { margin-top: 12px; }
.ready { background: #e7f6f1; }

@media (max-width: 760px) {
  .top, main { width: min(980px, calc(100% - 24px)); }
  .grid, .grid.two { grid-template-columns: 1fr; }
  .split, .row { align-items: stretch; }
  .split .button, .row button, .row .button { width: 100%; }
  .list li { align-items: flex-start; flex-direction: column; }
  .list.compact code { max-width: 100%; white-space: normal; word-break: break-all; }
  .hero { padding-top: 18px; }
}
