
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #e8450a;
  --brand-lo: rgba(232,69,10,.10);
  --brand-lt: #fff1ec;
  --bg: #fffaf8;
  --surface: #fff;
  --border: #edddd4;
  --border-hi: #ddd0c4;
  --text-h: #1a0800;
  --text-b: #5c3d2e;
  --text-m: #a08070;
  --text-lo: #c4a090;
  --code-bg: #1c0500;
  --code-text: #e8d5c0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 8px 32px rgba(0,0,0,.09);
}
html, body { min-height: 100%; font-family: 'Onest','Helvetica Neue',system-ui,sans-serif; background: var(--bg); color: var(--text-b); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,250,248,.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 4px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; color: var(--text-h); margin-right: 12px; letter-spacing: -.02em; }
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-link { font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 8px; color: var(--text-m); transition: all .15s; }
.nav-link:hover, .nav-link.active { color: var(--text-h); background: var(--brand-lt); }
.nav-cta { margin-left: auto; flex-shrink: 0; background: var(--brand); color: white; font-size: 13.5px; font-weight: 700; padding: 8px 18px; border-radius: 9px; letter-spacing: -.01em; transition: opacity .15s; }
.nav-cta:hover { opacity: .88; }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; margin-left: 12px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--text-b); border-radius: 2px; }

/* FOOTER */
footer { border-top: 1px solid var(--border); padding: 28px 24px; }
.footer-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; color: var(--text-h); }
.footer-slogan { font-size: 13px; color: var(--text-lo); font-style: italic; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; font-weight: 500; color: var(--text-m); transition: color .15s; }
.footer-links a:hover { color: var(--brand); }

/* HERO */
.hero { position: relative; padding: 96px 24px 84px; text-align: center; overflow: hidden; background-color: var(--bg); background-image: radial-gradient(circle, #d4b8a8 1px, transparent 1px); background-size: 26px 26px; }
.hero-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 860px; height: 520px; background: radial-gradient(ellipse at center, rgba(232,69,10,.13) 0%, rgba(232,69,10,.06) 42%, transparent 68%); pointer-events: none; }
.hero-content { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--brand); background: var(--brand-lo); padding: 5px 14px; border-radius: 100px; margin-bottom: 28px; }
.hero-title { font-size: clamp(36px,5.5vw,62px); font-weight: 900; letter-spacing: -.04em; color: var(--text-h); line-height: 1.07; }
.hero-sub { font-size: clamp(16px,2vw,19px); color: var(--text-b); margin-top: 18px; line-height: 1.65; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.btn-primary { background: var(--brand); color: white; font-size: 15.5px; font-weight: 700; padding: 14px 28px; border-radius: 12px; letter-spacing: -.01em; transition: opacity .15s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary:hover { opacity: .88; }
.btn-secondary { background: white; color: var(--text-b); font-size: 15.5px; font-weight: 500; padding: 14px 24px; border-radius: 12px; border: 1.5px solid var(--border); display: inline-flex; align-items: center; gap: 8px; transition: border-color .15s; }
.btn-secondary:hover { border-color: var(--border-hi); }

/* GUIDE CARDS */
.section { max-width: 1160px; margin: 0 auto; padding: 56px 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-title { font-size: 22px; font-weight: 800; letter-spacing: -.025em; color: var(--text-h); }
.section-count { font-size: 13.5px; font-weight: 600; color: var(--text-m); }
.cards-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; position: relative; overflow: hidden; transition: all .22s ease; cursor: pointer; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: transparent; }
.card-bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.card-tag { display: inline-flex; align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 100px; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--text-h); line-height: 1.45; margin-bottom: 9px; letter-spacing: -.01em; }
.card-desc { font-size: 13.5px; color: var(--text-m); line-height: 1.6; flex: 1; }
.card-link { display: inline-flex; font-size: 13.5px; font-weight: 700; margin-top: 18px; letter-spacing: -.01em; }

/* GUIDE PAGE */
.guide-root { display: flex; max-width: 1160px; margin: 0 auto; padding: 0 24px 80px; gap: 48px; align-items: flex-start; }
.guide-sidebar { width: 220px; flex-shrink: 0; position: sticky; top: 80px; padding-top: 40px; }
.sidebar-label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-lo); margin-bottom: 12px; padding-left: 10px; }
.sidebar-link { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 9px; font-size: 13.5px; color: var(--text-m); transition: all .15s; margin-bottom: 2px; cursor: pointer; }
.sidebar-link:hover { background: #fef5f0; color: var(--text-h); }
.sidebar-link.active { background: #fff1ec; color: var(--text-h); font-weight: 600; border-left: 2px solid var(--brand); border-radius: 0 9px 9px 0; }
.sidebar-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.guide-content { flex: 1; min-width: 0; padding-top: 40px; }
.guide-header { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.guide-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.guide-tag { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 100px; }
.guide-title { font-size: 30px; font-weight: 900; letter-spacing: -.035em; color: var(--text-h); margin-bottom: 10px; line-height: 1.15; }
.guide-desc { font-size: 16px; color: var(--text-m); line-height: 1.65; }

/* INPUTS BLOCK */
.inputs-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; margin-bottom: 32px; box-shadow: var(--shadow-sm); }
.inputs-title { font-size: 18px; font-weight: 800; color: var(--text-h); margin-bottom: 6px; letter-spacing: -.02em; }
.inputs-hint { color: var(--text-m); font-size: 13.5px; margin-bottom: 20px; line-height: 1.55; }
.float-field { position: relative; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); padding: 18px 14px 8px; margin-bottom: 10px; transition: border-color .18s; }
.float-field:focus-within { border-color: var(--brand); }
.float-label { position: absolute; top: 14px; left: 14px; font-size: 14px; color: var(--text-m); pointer-events: none; transition: all .15s; }
.float-field.has-value .float-label, .float-field:focus-within .float-label { top: 6px; font-size: 10px; font-weight: 800; color: var(--brand); letter-spacing: .05em; text-transform: uppercase; }
.float-input { background: transparent; border: none; outline: none; color: var(--text-h); font-size: 14.5px; width: 100%; font-family: inherit; }
.checkbox-row { display: flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 12px; user-select: none; }
.checkbox-box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-hi); background: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s; }
.checkbox-box.checked { background: var(--brand); border-color: var(--brand); }
.checkbox-label { color: var(--text-b); font-size: 14.5px; }
.inputs-divider { height: 1px; background: var(--border); margin: 16px 0; }
.relay-fields { padding-left: 32px; border-left: 2px solid var(--border); margin-bottom: 4px; }
.os-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.os-label { color: var(--text-m); }
.os-select-wrap { display: flex; align-items: center; gap: 6px; border-bottom: 1.5px solid var(--text-h); padding-bottom: 1px; }
.os-select { appearance: none; background: transparent; border: none; color: var(--text-h); font-size: 14px; font-weight: 700; cursor: pointer; outline: none; padding-right: 4px; font-family: inherit; }

/* BLOCKS */
.block-step { font-size: 19px; font-weight: 800; color: var(--text-h); margin-top: 36px; margin-bottom: 8px; letter-spacing: -.025em; display: flex; align-items: center; gap: 10px; }
.block-step::before { content: ''; display: inline-block; width: 3px; height: 20px; background: var(--brand); border-radius: 2px; flex-shrink: 0; }
.block-text { color: var(--text-b); font-size: 15px; line-height: 1.7; margin: 6px 0; white-space: pre-line; }
.block-success { display: flex; align-items: flex-start; gap: 12px; background: #ecfdf5; border: 1px solid #86efac; border-radius: var(--radius); padding: 16px 20px; color: #065f46; font-size: 14px; line-height: 1.65; margin-top: 16px; white-space: pre-line; }
.block-warning { display: flex; align-items: flex-start; gap: 12px; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 16px 20px; color: #92400e; font-size: 14px; line-height: 1.65; margin-top: 16px; white-space: pre-line; }

/* CODE BLOCK */
.code-wrap { margin: 14px 0; border-radius: 12px; overflow: hidden; background: var(--code-bg); box-shadow: 0 4px 20px rgba(0,0,0,.15); }
.code-title { padding: 8px 16px; font-size: 11.5px; color: #6b4030; border-bottom: 1px solid rgba(255,255,255,.05); font-family: 'JetBrains Mono',monospace; }
.code-inner { display: flex; align-items: flex-start; }
.code-pre { flex: 1; padding: 16px; overflow-x: auto; font-family: 'JetBrains Mono',monospace; font-size: 13px; line-height: 1.8; color: var(--code-text); white-space: pre; margin: 0; }
.code-copy { flex-shrink: 0; margin: 12px 12px 0 0; width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #6b4030; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.code-copy:hover { background: rgba(255,255,255,.12); color: var(--code-text); }
.code-copy.ok { border-color: #4ade80; color: #4ade80; background: rgba(74,222,128,.1); }

/* MARKDOWN */
.md h1 { font-size: 26px; font-weight: 900; letter-spacing: -.03em; color: var(--text-h); margin: 32px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.md h2 { font-size: 20px; font-weight: 800; color: var(--text-h); margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.md h3 { font-size: 17px; font-weight: 700; color: var(--text-h); margin: 20px 0 8px; }
.md h4 { font-size: 15px; font-weight: 700; color: var(--text-h); margin: 16px 0 6px; }
.md p { margin: 0 0 12px; color: var(--text-b); }
.md ul, .md ol { padding-left: 22px; margin: 0 0 12px; }
.md li { margin: 4px 0; color: var(--text-b); }
.md a { color: var(--brand); }
.md a:hover { text-decoration: underline; }
.md strong { color: var(--text-h); font-weight: 700; }
.md code { font-family: 'JetBrains Mono',monospace; font-size: 12.5px; background: #fef0e8; border: 1px solid #f4c0a8; padding: 2px 7px; border-radius: 5px; color: #c2400c; }
.md pre { background: var(--code-bg); border-radius: var(--radius); padding: 18px; overflow-x: auto; margin: 16px 0; position: relative; }
.md pre code { background: none; border: none; padding: 0; font-size: 13px; line-height: 1.75; color: var(--code-text); }
.md pre .copy-pre { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 7px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #6b4030; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.md pre .copy-pre:hover { background: rgba(255,255,255,.12); color: var(--code-text); }
.md blockquote { border-left: 3px solid var(--brand); margin: 16px 0; padding: 10px 16px; background: var(--brand-lt); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: #7a3010; }
.md blockquote p { margin: 0; color: inherit; }
.md table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.md th { background: #fef5f0; font-weight: 700; color: var(--text-h); text-align: left; }
.md th, .md td { border: 1px solid var(--border); padding: 9px 14px; }
.md tr:nth-child(even) { background: #fffaf8; }
.md hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.md img { max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin: 8px 0; }

/* ADMIN */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 48px 24px 80px; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--border); gap: 16px; }
.admin-title { font-size: 28px; font-weight: 900; color: var(--text-h); letter-spacing: -.03em; margin-bottom: 4px; }
.admin-sub { color: var(--text-m); font-size: 14px; }
.guide-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: white; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; transition: border-color .15s; margin-bottom: 8px; }
.guide-row:hover { border-color: var(--border-hi); box-shadow: var(--shadow-sm); }
.guide-row-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.guide-row-title { font-size: 14.5px; font-weight: 700; color: var(--text-h); }
.guide-row-slug { font-size: 12px; color: var(--text-lo); font-family: 'JetBrains Mono',monospace; margin-top: 2px; }
.guide-row-actions { display: flex; gap: 4px; flex-shrink: 0; }
.row-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text-m); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .12s; }
.row-btn:hover { background: #fef5f0; color: var(--text-h); border-color: var(--border); }
.row-btn.del:hover { color: #dc2626; background: #fef2f2; border-color: #fecaca; }

/* EDITOR */
.editor-wrap { max-width: 900px; margin: 0 auto; padding: 40px 24px 80px; }
.editor-top { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.meta-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.meta-row { display: flex; gap: 12px; margin-bottom: 14px; }
.meta-field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.field-label { font-size: 11px; font-weight: 700; color: var(--text-m); text-transform: uppercase; letter-spacing: .06em; }
.meta-input, .meta-select { background: var(--bg); border: 1.5px solid var(--border); border-radius: 9px; padding: 10px 12px; color: var(--text-h); font-size: 14.5px; outline: none; width: 100%; font-family: inherit; transition: border-color .15s; }
.meta-input:focus, .meta-select:focus { border-color: var(--brand); }
.block-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.block-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg); }
.block-type-badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; font-family: 'JetBrains Mono',monospace; }
.block-textarea { display: block; width: 100%; background: transparent; border: none; padding: 12px 14px; color: var(--text-h); font-size: 14px; line-height: 1.65; outline: none; resize: vertical; min-height: 60px; font-family: inherit; }
.block-textarea.mono { font-family: 'JetBrains Mono',monospace; font-size: 13px; background: #faf8f7; }
.add-block-btn { width: 100%; padding: 13px; border: 2px dashed var(--border-hi); border-radius: var(--radius); background: transparent; color: var(--text-m); font-size: 14px; cursor: pointer; transition: all .15s; margin-top: 4px; font-family: inherit; }
.add-block-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-lt); }
.add-menu { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 4px; box-shadow: var(--shadow-md); }
.add-menu-item { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 9px; background: transparent; border: 1px solid var(--border); color: var(--text-m); font-size: 13.5px; cursor: pointer; transition: all .12s; font-family: inherit; }
.add-menu-item:hover { background: #fef5f0; color: var(--text-h); border-color: var(--border-hi); }
.vars-hint { background: var(--bg); border-radius: 9px; padding: 10px 14px; font-size: 12.5px; color: var(--text-m); margin-top: 14px; }
.var-chip { font-family: 'JetBrains Mono',monospace; font-size: 11px; background: #fef0e8; border: 1px solid #f4c0a8; padding: 1px 6px; border-radius: 4px; color: #c2400c; margin-right: 4px; }

/* LOGIN */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 24px; }
.login-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 36px; width: 100%; max-width: 400px; box-shadow: var(--shadow-sm); }
.login-icon { width: 48px; height: 48px; background: var(--brand-lt); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--brand); margin-bottom: 20px; }
.login-title { font-size: 22px; font-weight: 900; color: var(--text-h); margin-bottom: 6px; letter-spacing: -.025em; }
.login-sub { color: var(--text-m); font-size: 14px; margin-bottom: 28px; }

/* CONTACTS */
.contacts-wrap { max-width: 1160px; margin: 0 auto; padding: 72px 24px 80px; }
.contact-card { display: flex; align-items: center; gap: 20px; background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 14px; transition: all .2s; }
.contact-card:hover { border-color: var(--border-hi); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.contact-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-title { font-size: 16px; font-weight: 800; color: var(--text-h); margin-bottom: 4px; }
.contact-desc { font-size: 14px; color: var(--text-m); margin-bottom: 8px; }
.contact-link { font-size: 14px; font-weight: 700; }

/* UTILS */
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-hi); border-top-color: var(--brand); animation: spin .7s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 56px 24px; color: var(--text-m); }
.tag-badge { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 9px; border-radius: 100px; }
.error-bar { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 12px 16px; color: #dc2626; font-size: 14px; margin-bottom: 16px; }
.btn { display: inline-flex; align-items: center; gap: 7px; border: none; cursor: pointer; font-family: inherit; font-weight: 700; border-radius: 10px; transition: opacity .15s; letter-spacing: -.01em; }
.btn-brand { background: var(--brand); color: white; font-size: 14px; padding: 9px 18px; }
.btn-brand:hover { opacity: .88; }
.btn-outline { background: transparent; color: var(--text-m); font-size: 13.5px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; }
.btn-outline:hover { color: var(--text-h); border-color: var(--border-hi); background: #fef5f0; }

@media (max-width: 960px) { .cards-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 768px) {
  .guide-root { flex-direction: column; gap: 0; padding: 0 16px 60px; }
  .guide-sidebar { width: 100%; position: static; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .meta-row { flex-direction: column; }
  .add-menu { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) { .cards-grid { grid-template-columns: 1fr; } }
