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

:root {
    --bg: #0e1117;
    --surface: #161b27;
    --surface2: #1a2235;
    --border: #232b3e;
    --text: #e2e8f0;
    --muted: #64748b;
    --accent: #3b82f6;
    --email-color: #10b981;
    --sms-color: #f59e0b;
    --code-bg: #111827;
}

body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

.topbar { padding: 1rem 2rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.75rem; font-size: 0.875rem; color: var(--muted); }
.topbar a { color: var(--muted); text-decoration: none; }
.topbar a:hover { color: var(--text); }
.topbar .sep { color: var(--border); }

.hero { padding: 2.5rem 2rem 2rem; border-bottom: 1px solid var(--border); }
.hero-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
h1 { font-family: 'DM Serif Display', serif; font-size: 1.75rem; font-weight: 400; margin-bottom: 0.5rem; }
.hero-desc { color: var(--muted); font-size: 1rem; line-height: 1.6; max-width: 640px; }

.badge { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 3px; }
.badge-email { background: rgba(16,185,129,0.12); color: var(--email-color); }
.badge-sms { background: rgba(245,158,11,0.12); color: var(--sms-color); }

.layout { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - 160px); }

.sidebar { border-right: 1px solid var(--border); padding: 2rem; }
.sidebar-section { margin-bottom: 2rem; }
.sidebar-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; }
.param-row { display: flex; justify-content: space-between; align-items: baseline; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.param-name { font-family: 'Courier New', monospace; color: var(--accent); font-size: 0.825rem; }
.param-val { color: var(--muted); }
.table-tag { display: inline-block; font-size: 0.775rem; font-family: 'Courier New', monospace; background: var(--surface2); border: 1px solid var(--border); color: var(--muted); padding: 0.2rem 0.45rem; border-radius: 3px; margin: 0.2rem 0.15rem 0.2rem 0; }

.main { padding: 2rem; min-width: 0; }
.section-title { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.cte-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 1.5rem; }
.cte-card { background: var(--surface); padding: 1.1rem 1.25rem; }
.cte-name { font-family: 'Courier New', monospace; font-size: 0.875rem; color: var(--accent); margin-bottom: 0.35rem; }
.cte-purpose { font-size: 0.9rem; color: var(--text); margin-bottom: 0.25rem; line-height: 1.4; }
.cte-note { font-size: 0.825rem; color: var(--muted); line-height: 1.4; }

.logic-block { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 1.25rem; margin-bottom: 1rem; font-size: 0.95rem; line-height: 1.75; color: var(--text); }
.logic-block strong { color: var(--text); font-weight: 600; }
.logic-block code { font-family: 'Courier New', monospace; font-size: 0.85rem; background: var(--code-bg); padding: 0.1rem 0.35rem; border-radius: 3px; color: #93c5fd; }

.note { background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.2); border-radius: 6px; padding: 1rem 1.25rem; font-size: 0.925rem; color: #93c5fd; line-height: 1.6; margin-bottom: 1.5rem; }
.note code { font-family: 'Courier New', monospace; font-size: 0.85rem; background: rgba(59,130,246,0.1); padding: 0.1rem 0.3rem; border-radius: 2px; }

.output-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.5rem; margin-bottom: 1.5rem; }
.output-field { font-family: 'Courier New', monospace; font-size: 0.825rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 0.35rem 0.6rem; border-radius: 3px; }

pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem; font-family: 'Courier New', monospace; font-size: 0.825rem; line-height: 1.7; color: #cbd5e1; margin-bottom: 1.5rem; white-space: pre-wrap; word-break: break-all; overflow-x: hidden; }
