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

/* ═══════════════ THEME VARIABLES (matches Toolinium main site) ═══════════════ */
[data-theme="dark"] {
  --bg:        #0b0d14;
  --bg2:       #111420;
  --bg3:       #161a28;
  --surface:   #1c2132;
  --surface2:  #222843;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.14);
  --text:      #e6e9f4;
  --text2:     #8b94b8;
  --text3:     #555e80;
  --accent:    #4f80ff;
  --accent2:   #7c5ef7;
  --accentRGB: 79,128,255;
  --green:     #22d3a5;
  --amber:     #f5a623;
  --red:       #ff5c6a;
  --header-from: #0f1629;
  --header-to:   #0b0d14;
  --card-hover-border: rgba(79,128,255,0.4);
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
}
[data-theme="light"] {
  --bg:        #f0f2fa;
  --bg2:       #ffffff;
  --bg3:       #ebeef8;
  --surface:   #f4f6fd;
  --surface2:  #e8ecf8;
  --border:    rgba(0,0,0,0.08);
  --border2:   rgba(0,0,0,0.15);
  --text:      #111827;
  --text2:     #4b5480;
  --text3:     #9ba3c0;
  --accent:    #3b6ef0;
  --accent2:   #6c47e8;
  --accentRGB: 59,110,240;
  --green:     #10b981;
  --amber:     #d97706;
  --red:       #ef4444;
  --header-from: #1e3a8a;
  --header-to:   #312e81;
  --card-hover-border: rgba(59,110,240,0.35);
  --shadow: 0 8px 32px rgba(59,110,240,0.12);
}

:root {
  --radius:    12px;
  --radius-sm: 8px;
  --font:     'Inter', sans-serif;
  --font-h:   'Space Grotesk', sans-serif;
  --content-w: 880px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s, color 0.3s;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }

/* ═══ SIMPLE TOPBAR ═══ */
.lp-topbar {
  position: sticky; top: 0; z-index: 100;
  height: 64px;
  background: rgba(11,13,20,0.82); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  transition: background 0.3s;
}
[data-theme="light"] .lp-topbar { background: rgba(240,242,250,0.88); }

.lp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.lp-brand img { height: 30px; width: auto; display: block; }
.lp-brand span { font-family: var(--font-h); font-weight: 700; font-size: 16px; color: var(--text); }

.lp-back {
  display: flex; align-items: center; gap: 7px;
  color: var(--text2); text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border2);
  transition: all 0.18s;
}
.lp-back:hover { color: var(--text); border-color: var(--accent); background: var(--surface); }

.theme-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 7px 14px;
  color: var(--text2); font-family: var(--font); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.theme-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--accent); }
.lp-right { display: flex; align-items: center; gap: 10px; }
@media (max-width: 560px) { .theme-btn span, .lp-brand span { display: none; } }

/* ═══ PAGE HERO ═══ */
.lp-hero {
  background: linear-gradient(135deg, var(--header-from) 0%, var(--header-to) 100%);
  padding: 56px 24px 48px; text-align: center; border-bottom: 1px solid var(--border);
}
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  color: #fff; letter-spacing: 1.2px; text-transform: uppercase;
  background: rgba(255,255,255,0.12); padding: 6px 14px; border-radius: 20px; margin-bottom: 16px;
}
.lp-hero h1 {
  font-family: var(--font-h); font-size: clamp(26px,4vw,38px); font-weight: 700;
  color: #fff; margin-bottom: 10px;
}
.lp-hero p { color: rgba(255,255,255,0.75); font-size: 14.5px; max-width: 560px; margin: 0 auto; }
.lp-updated { margin-top: 18px; font-size: 12.5px; color: rgba(255,255,255,0.55); }

/* ═══ CONTENT WRAP ═══ */
.lp-main { flex: 1; }
.lp-wrap {
  max-width: var(--content-w); margin: 0 auto; padding: 48px 24px 72px;
}

/* Table of contents */
.lp-toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 40px;
}
.lp-toc h2 {
  font-family: var(--font-h); font-size: 14px; color: var(--text); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.6px;
}
.lp-toc ol { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; counter-reset: toc; }
.lp-toc li { counter-increment: toc; font-size: 13px; }
.lp-toc li a {
  color: var(--text2); text-decoration: none; transition: color 0.15s;
}
.lp-toc li a::before { content: counter(toc) ". "; color: var(--accent); font-weight: 600; }
.lp-toc li a:hover { color: var(--accent); }
@media (max-width: 640px) { .lp-toc ol { grid-template-columns: 1fr; } }

/* Prose typography */
.lp-section { margin-bottom: 40px; scroll-margin-top: 84px; }
.lp-section h2 {
  font-family: var(--font-h); font-size: 20px; font-weight: 700; color: var(--text);
  margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.lp-section h2 i {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  background: linear-gradient(135deg,var(--accent),var(--accent2)); color: #fff;
}
.lp-section h3 { font-family: var(--font-h); font-size: 15.5px; font-weight: 600; color: var(--text); margin: 20px 0 8px; }
.lp-section p { font-size: 14px; line-height: 1.8; color: var(--text2); margin-bottom: 14px; }
.lp-section ul, .lp-section ol.plain { margin: 0 0 14px 0; padding-left: 20px; }
.lp-section li { font-size: 14px; line-height: 1.8; color: var(--text2); margin-bottom: 6px; }
.lp-section a { color: var(--accent); text-decoration: none; }
.lp-section a:hover { text-decoration: underline; }
.lp-section strong { color: var(--text); font-weight: 600; }

.lp-note {
  background: rgba(var(--accentRGB),0.08); border: 1px solid rgba(var(--accentRGB),0.25);
  border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13px; color: var(--text2);
  margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start;
}
.lp-note i { color: var(--accent); margin-top: 2px; }

table.lp-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 13px; }
table.lp-table th, table.lp-table td {
  border: 1px solid var(--border); padding: 10px 12px; text-align: left; color: var(--text2);
}
table.lp-table th { background: var(--surface); color: var(--text); font-weight: 600; }

/* Cards (About / Contact) */
.lp-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 16px; margin-bottom: 16px; }
.lp-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.lp-card:hover { border-color: var(--card-hover-border); transform: translateY(-3px); }
.lp-card-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,var(--accent),var(--accent2));
  color: #fff; font-size: 15px; margin-bottom: 12px;
}
.lp-card h4 { font-size: 14.5px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.lp-card p { font-size: 12.5px; color: var(--text2); line-height: 1.6; margin: 0; }

/* Stats row (About) */
.lp-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin: 28px 0; }
.lp-stat { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 10px; }
.lp-stat-num { font-family: var(--font-h); font-size: 24px; font-weight: 700; background: linear-gradient(135deg,var(--accent),var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-stat-label { font-size: 11px; color: var(--text2); margin-top: 4px; }
@media (max-width: 640px) { .lp-stats { grid-template-columns: repeat(2,1fr); } }

/* Contact form */
.lp-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 760px) { .lp-contact-grid { grid-template-columns: 1fr; } }
.lp-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.lp-field { margin-bottom: 16px; }
.lp-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.lp-field input, .lp-field textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border2); background: var(--bg2); color: var(--text);
  font-family: var(--font); font-size: 13.5px; outline: none; transition: border-color 0.18s;
}
.lp-field input:focus, .lp-field textarea:focus { border-color: var(--accent); }
.lp-field textarea { resize: vertical; min-height: 120px; }
.lp-submit {
  padding: 12px 22px; border-radius: var(--radius-sm); border: none;
  background: linear-gradient(135deg,var(--accent),var(--accent2)); color: #fff; font-weight: 600; font-size: 13.5px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.lp-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(var(--accentRGB),0.35); }
.lp-form-msg { font-size: 13px; margin-top: 12px; display: none; }
.lp-form-msg.show { display: block; }
.lp-form-msg.ok { color: var(--green); }
.lp-form-msg.err { color: var(--red); }

/* ═══ FOOTER (same as main site) ═══ */
.site-footer { background: var(--bg2); border-top: 1px solid var(--border); width: 100%; }
.footer-main { padding: 56px 32px 24px; }
.footer-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-brand-col .footer-logo img { width: 150px; margin-bottom: 14px; }
.footer-tagline { font-size: 12.5px; color: var(--text2); line-height: 1.7; margin-bottom: 16px; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text2); text-decoration: none; font-size: 13px;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.footer-socials a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.footer-col h5 { font-family: var(--font-h); font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 16px; letter-spacing: 0.3px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 12.5px; color: var(--text2); text-decoration: none; transition: color 0.18s; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-contact li { font-size: 12.5px; color: var(--text2); display: flex; align-items: center; gap: 8px; }
.footer-contact li i { color: var(--accent); width: 14px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 18px 32px; max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.footer-bottom p { font-size: 12px; color: var(--text3); }
.footer-made { display: flex; align-items: center; gap: 4px; }

.back-to-top {
  position: fixed; bottom: 26px; right: 26px; z-index: 150;
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: linear-gradient(135deg,var(--accent),var(--accent2));
  color: #fff; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(var(--accentRGB),0.4);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }
