:root {
  --navy: #0A0F2E; --ink: #1c2233; --muted: #5d6478; --line: #e3e6ee; --bg: #f5f7fb;
  --card: #fff; --fb: #1877F2; --fb-dark: #0f63d6; --ok: #127a43; --ok-bg: #e6f6ed;
  --warn: #8a5a00; --warn-bg: #fff4dc; --err: #b42318; --err-bg: #fdecea;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 17px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--fb); text-decoration: none; }
a:hover { text-decoration: underline; }
main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 32px 20px 48px; }

.top { background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 28px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand img { height: 44px; width: auto; display: block; }
.brand .product { font-size: 20px; font-weight: 700; color: var(--navy); border-left: 2px solid var(--line); padding-left: 12px; line-height: 1.2; }
.top nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.top nav a, .top nav .link { color: var(--ink); font-size: 15px; }
.who { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.who img { width: 28px; height: 28px; border-radius: 50%; }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 15px; line-height: inherit; vertical-align: baseline; }
.detail > div { margin-top: 4px; }
button.link:hover { text-decoration: underline; }

.foot { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 28px; }

h1 { font-size: 32px; line-height: 1.2; margin: 0 0 12px; color: var(--navy); }
h2 { font-size: 22px; margin: 32px 0 12px; color: var(--navy); }
h3 { font-size: 18px; margin: 0 0 6px; }
p.lead { font-size: 19px; color: var(--muted); max-width: 680px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 24px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 46px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: #e8f0fe; color: var(--fb); font-weight: 700; display: grid; place-items: center; }

.btn { display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 10px; padding: 13px 22px; font: 600 17px/1 inherit; font-family: inherit; cursor: pointer; text-decoration: none !important; }
.btn-fb { background: var(--fb); color: #fff; }
.btn-fb:hover { background: var(--fb-dark); }
.btn-fb svg { width: 22px; height: 22px; fill: #fff; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #1b2350; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f1f3f8; }
.btn-danger { background: #fff; color: var(--err); border: 1px solid #f3c2bd; }
.btn-danger:hover { background: var(--err-bg); }
.btn-sm { padding: 9px 14px; font-size: 15px; }
.btn:disabled { background: #e6e8ef; color: #9aa0b0; border-color: #e6e8ef; cursor: not-allowed; }

.flash { border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; font-size: 16px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.flash.err { background: var(--err-bg); color: var(--err); }

.perm { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: #eef2ff; color: #3730a3; border-radius: 6px; padding: 2px 8px; margin: 2px 4px 2px 0; }

.pages { display: grid; gap: 14px; }
.page-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; }
.page-row img, .page-row .ph { width: 56px; height: 56px; border-radius: 12px; background: #e8ebf3; object-fit: cover; }
.page-row .meta { min-width: 0; }
.page-row .name { font-weight: 700; font-size: 18px; }
.page-row .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.badge { display: inline-block; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 10px; }
.badge.on { background: var(--ok-bg); color: var(--ok); }
.badge.off { background: #eef0f5; color: var(--muted); }
.detail { grid-column: 2 / -1; font-size: 14px; color: var(--muted); }

.doc { max-width: 780px; }
.doc h2 { font-size: 20px; }
.doc li { margin-bottom: 6px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .page-row { grid-template-columns: 48px 1fr; }
  .page-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .detail { grid-column: 1 / -1; }
  h1 { font-size: 27px; }
}
