/* ============================================================
   PASSWORDGENERATOR.NOW — Design System
   Clean, trustworthy, emerald-accent UI (Sudoku.by-style system)
   ============================================================ */

/* Self-hosted Inter (latin) — no external font requests */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../fonts/inter-800.woff2') format('woff2'); }

:root {
  --brand: #059669;
  --brand-dark: #047857;
  --brand-light: #ecfdf5;
  --brand-border: #a7f3d0;
  --accent: #f59e0b;
  --accent-light: #fffbeb;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #6ee7b7;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --nav-height: 62px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

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

html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--surface-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img, video, iframe, embed, object { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; color: var(--text); }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }

.container    { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 760px;  margin: 0 auto; padding: 0 1.5rem; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
.page-wrap    { padding: 2.5rem 0; }

/* ---------------- Header ---------------- */
.site-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav-inner { display: flex; align-items: center; height: 100%; gap: 0; }
.nav-logo {
  display: flex; align-items: center; gap: .45rem;
  font-size: 1.25rem; font-weight: 800; color: var(--brand);
  letter-spacing: -0.5px; margin-right: 1.5rem; white-space: nowrap; flex-shrink: 0;
}
.nav-logo:hover { color: var(--brand-dark); }
.nav-logo svg { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 0.25rem; flex: 1; list-style: none; }
.nav-links a {
  display: block; padding: 0.4rem 0.75rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; color: var(--text); white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover,
.nav-links a.active { background: var(--brand-light); color: var(--brand); }

.nav-has-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: flex; align-items: center; gap: .3rem;
  padding: 0.4rem 0.75rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; color: var(--text);
  white-space: nowrap; cursor: pointer;
  transition: background 0.15s, color 0.15s; user-select: none;
}
.nav-dropdown-trigger svg { transition: transform .15s; }
.nav-dropdown-trigger:hover { background: var(--surface-3); }
.nav-has-dropdown.open .nav-dropdown-trigger { background: var(--brand-light); color: var(--brand); }
.nav-has-dropdown.open .nav-dropdown-trigger svg { transform: rotate(180deg); }
.nav-mega {
  position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,.14);
  width: 520px; padding: .75rem 0 .5rem; display: none; z-index: 300;
}
.nav-has-dropdown.open .nav-mega { display: block; }
.nav-mega-cols { display: grid; grid-template-columns: 1fr 1fr; }
.nav-mega-heading {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); padding: .6rem 1rem .2rem;
}
.nav-mega a {
  display: flex; align-items: center; justify-content: space-between;
  padding: .3rem 1rem; font-size: .84rem; color: var(--text);
  border-radius: 4px; transition: background .1s, color .1s;
}
.nav-mega a:hover { background: var(--brand-light); color: var(--brand); }
.nav-mega-footer {
  border-top: 1px solid var(--border); margin-top: .5rem;
  padding: .5rem 1rem 0; display: flex; justify-content: flex-end;
}
.nav-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

.nav-hamburger {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 38px; height: 38px; border: none; background: none; cursor: pointer;
  border-radius: var(--radius-sm); padding: 6px; transition: background .15s;
  flex-shrink: 0; margin-left: .25rem;
}
.nav-hamburger:hover { background: var(--brand-light); }
.nav-hamburger span {
  display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .22s, opacity .22s, width .22s; transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-panel {
  display: none; position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
  z-index: 99; overflow-y: auto; background: var(--surface);
  border-top: 1px solid var(--border); box-shadow: 0 8px 30px rgba(0,0,0,.12);
  padding: 0 0 2rem; transform: translateY(-6px); opacity: 0;
  transition: opacity .2s, transform .2s;
}
.nav-mobile-panel.open { opacity: 1; transform: translateY(0); }
.nav-mobile-panel .mob-link {
  display: block; padding: .65rem 1.25rem; font-size: .95rem; font-weight: 500;
  color: var(--text); transition: background .1s, color .1s;
}
.nav-mobile-panel .mob-link:hover,
.nav-mobile-panel .mob-link.active { background: var(--brand-light); color: var(--brand); }
.nav-mobile-section { border-top: 1px solid var(--border); margin-top: .4rem; padding-top: .4rem; }
.nav-mobile-acc-btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: .65rem 1.25rem; font-size: .95rem; font-weight: 500; color: var(--text);
  background: none; border: none; cursor: pointer; text-align: left; font-family: var(--font);
  transition: background .1s, color .1s;
}
.nav-mobile-acc-btn svg { transition: transform .15s; }
.nav-mobile-acc-btn.open svg { transform: rotate(180deg); }
.nav-mobile-acc-body { display: none; padding: 0 0 .4rem; }
.nav-mobile-acc-body.open { display: block; }
.nav-mobile-acc-body .mob-sub-link {
  display: block; padding: .45rem 1.25rem .45rem 2.25rem; font-size: .87rem;
  color: var(--text-muted); transition: background .1s, color .1s;
}
.nav-mobile-acc-body .mob-sub-link:hover { background: var(--brand-light); color: var(--brand); }
.nav-mobile-actions {
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1rem 1.25rem .5rem; border-top: 1px solid var(--border); margin-top: .75rem;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--font);
}
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-light); color: var(--brand-dark); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: #d97706; border-color: #d97706; color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn-xl { padding: 1rem 2.5rem; font-size: 1.1rem; border-radius: var(--radius); }
.btn-full { width: 100%; }

/* ---------------- Cards ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-body { padding: 1.5rem; }
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: inherit;
}
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ---------------- Badges / alerts / forms ---------------- */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px;
         font-size: 0.75rem; font-weight: 600; }
.badge-brand  { background: var(--brand-light); color: var(--brand-dark); }
.badge-green  { background: #f0fdf4; color: #166534; }
.badge-yellow { background: var(--accent-light); color: #92400e; }
.badge-red    { background: #fef2f2; color: #991b1b; }
.badge-gray   { background: var(--surface-3); color: var(--text-muted); }
.badge-blue   { background: #eff6ff; color: #1d4ed8; }

.alert { padding: 0.85rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1rem;
         font-size: 0.9rem; display: flex; align-items: flex-start; gap: 0.6rem; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.alert-danger  { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-warning { background: var(--accent-light); border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: var(--brand-light); border: 1px solid var(--brand-border); color: #065f46; }

.form-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--text); }
.form-control {
  width: 100%; padding: 0.6rem 0.875rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; color: var(--text); background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: var(--font);
}
.form-control:focus {
  outline: none; border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(5,150,105,.15);
}
textarea.form-control { resize: vertical; min-height: 110px; }
select.form-control { appearance: auto; }

/* ---------------- Grids / sections ---------------- */
.section { padding: 3rem 0; }
.section-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.section-subtitle { color: var(--text-muted); margin-bottom: 2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

.feature-card { padding: 1.75rem; border-radius: var(--radius); background: var(--surface);
                border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.feature-card-icon svg { width: 40px; height: 40px; color: var(--brand); display: block; }

.tool-card {
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1.5rem; border-radius: var(--radius); background: var(--surface);
  border: 2px solid var(--border); transition: all 0.2s; text-decoration: none; color: var(--text);
}
.tool-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.tool-card svg { color: var(--brand); }
.tool-card h3 { font-size: 1.02rem; }
.tool-card p { font-size: .85rem; margin: 0; }

.kicker {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted);
}
.kicker-brand { color: var(--brand); }

/* ---------------- Breadcrumb / tables / pagination ---------------- */
.breadcrumb-bar { padding: 1.1rem 0 0; }
.breadcrumb-bar .breadcrumb { margin-bottom: 0; }
.breadcrumb { display: flex; align-items: center; gap: .4rem; font-size: .85rem;
              color: var(--text-muted); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--brand); }
.breadcrumb .sep { color: var(--text-light); }

.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table thead tr { background: var(--surface-2); }
.data-table th { padding: .65rem 1rem; font-weight: 700; color: var(--text); text-align: left;
                 border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table td { padding: .6rem 1rem; border-bottom: 1px solid var(--border);
                 color: var(--text); vertical-align: top; line-height: 1.55; }
.data-table tbody tr:nth-child(even) { background: var(--surface-2); }
.data-table tbody tr:hover td { background: var(--brand-light); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(135deg, #047857 0%, #059669 60%, #34d399 100%);
  color: white; padding: 4rem 0 3rem; text-align: center;
}
.hero h1 { color: white; font-size: 2.8rem; margin-bottom: 1rem; }
.hero p  { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; }

/* ---------------- Tool area ---------------- */
.tool-hero { padding: 1.5rem 0 2rem; }
.tool-hero h1 { font-size: 1.5rem; text-align: center; margin-bottom: .35rem; }
.tool-hero .tool-sub { font-size: .85rem; color: var(--text-muted); text-align: center;
                       max-width: 560px; margin: 0 auto 1.5rem; }

.pw-output {
  display: flex; align-items: center; gap: .6rem;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: .9rem 1rem; margin-bottom: 1rem;
}
.pw-output-text {
  flex: 1; font-family: var(--mono); font-size: 1.25rem; font-weight: 600;
  word-break: break-all; line-height: 1.35; color: var(--text); min-height: 1.7rem;
  border: none; background: none; width: 100%; outline: none;
}
.pw-output .char-d { color: #2563eb; }
.pw-output .char-s { color: #dc2626; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-sm);
  border: none; background: var(--surface-3); color: var(--text-muted); cursor: pointer;
  transition: all .15s;
}
.icon-btn:hover { background: var(--brand-light); color: var(--brand); }
.icon-btn.copied { background: #f0fdf4; color: #16a34a; }

.strength-meter { height: 8px; border-radius: 999px; background: var(--surface-3);
                  overflow: hidden; margin-bottom: .4rem; }
.strength-meter-fill { height: 100%; border-radius: 999px; width: 0;
                       transition: width .25s, background .25s; }
.strength-label { font-size: .8rem; font-weight: 600; }
.str-0 { background: #ef4444; } .str-0-t { color: #ef4444; }
.str-1 { background: #f59e0b; } .str-1-t { color: #d97706; }
.str-2 { background: #eab308; } .str-2-t { color: #ca8a04; }
.str-3 { background: #22c55e; } .str-3-t { color: #16a34a; }
.str-4 { background: #059669; } .str-4-t { color: #047857; }

.opt-row { display: flex; align-items: center; justify-content: space-between;
           gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.opt-row:last-child { border-bottom: none; }
.opt-label { font-size: .9rem; font-weight: 500; color: var(--text); }
.opt-hint { font-size: .75rem; color: var(--text-light); display: block; font-weight: 400; }

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer; background: #cbd5e1;
  border-radius: 999px; transition: background .18s;
}
.switch .slider::before {
  content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: transform .18s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px rgba(5,150,105,.3); }

input[type="range"].range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px;
  background: var(--surface-3); border-radius: 999px; outline: none;
}
input[type="range"].range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); cursor: pointer; border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
input[type="range"].range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--brand);
  cursor: pointer; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.seg-tabs { display: flex; gap: 0.25rem; background: var(--surface-3);
            border-radius: 999px; padding: 0.3rem; }
.seg-tab  { flex: 1; text-align: center; padding: 0.35rem 0.75rem; border-radius: 999px;
            font-size: 0.82rem; font-weight: 600; cursor: pointer;
            transition: background .18s, color .18s, box-shadow .18s;
            color: var(--text-muted); border: none; background: none;
            text-decoration: none; white-space: nowrap; font-family: var(--font); }
.seg-tab:hover { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg-tab.active { background: var(--brand); color: #fff; box-shadow: 0 2px 6px rgba(5,150,105,.35); }

/* ---------------- Stat bars (CSS charts) ---------------- */
.stat-bar { display: flex; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.stat-bar-label { font-size: .82rem; color: var(--text-muted); min-width: 110px; }
.stat-bar-track { flex: 1; height: 10px; background: var(--surface-3);
                  border-radius: 99px; overflow: hidden; }
.stat-bar-fill  { height: 100%; border-radius: 99px; background: var(--brand); transition: width .3s; }
.stat-bar-val   { font-size: .8rem; color: var(--text); font-weight: 600;
                  min-width: 52px; text-align: right; }

.stat-tile { text-align: center; padding: 1.25rem 1rem; }
.stat-tile .num { font-size: 1.8rem; font-weight: 800; color: var(--brand); line-height: 1.2; }
.stat-tile .lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
                  color: var(--text-muted); font-weight: 600; margin-top: .25rem; }

/* ---------------- Magazine article layout ---------------- */
.article-layout {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 2rem;
  align-items: start;
}
.article-toc-sidebar     { position: sticky; top: 5rem; }
.article-related-sidebar { position: sticky; top: 5rem; }

.article-toc-nav { padding: .25rem 0; }
.article-toc-nav a {
  display: block; padding: .4rem .75rem; font-size: .8rem; color: var(--text-muted);
  border-left: 2px solid transparent; text-decoration: none; line-height: 1.4;
  transition: color .15s, border-color .15s, background .15s;
}
.article-toc-nav a:hover,
.article-toc-nav a.active { color: var(--brand); border-left-color: var(--brand); background: var(--brand-light); }
.article-toc-nav a.toc-h3 { padding-left: 1.5rem; font-size: .77rem; }

.key-points {
  background: var(--brand-light); border: 1px solid var(--brand-border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 2rem;
}
.key-points .kp-title {
  font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--brand-dark); margin-bottom: .6rem;
}
.key-points ul { padding-left: 1.2rem; }
.key-points ul li { font-size: .88rem; color: var(--text); margin-bottom: .3rem; line-height: 1.55; }

.article-hero-img { width: 100%; border-radius: var(--radius); margin-bottom: 1.5rem;
                    aspect-ratio: 1200/630; object-fit: cover; background: var(--surface-3); }

.article-body h2 {
  font-size: 1.25rem; font-weight: 700; color: var(--text);
  margin-top: 2.25rem; margin-bottom: .75rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 5.5rem;
}
.article-body h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.article-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--text);
                   margin-top: 1.5rem; margin-bottom: .5rem; scroll-margin-top: 5.5rem; }
.article-body p  { font-size: .97rem; line-height: 1.85; color: var(--text-muted); margin-bottom: 1rem; }
.article-body ul, .article-body ol { padding-left: 1.4rem; margin-bottom: 1.25rem;
                                     color: var(--text-muted); font-size: .94rem; line-height: 1.75; }
.article-body li { margin-bottom: .25rem; }
.article-body strong { color: var(--text); }
.article-body a { font-weight: 500; }
.article-body code { font-family: var(--mono); font-size: .85em; background: var(--surface-3);
                     padding: .1em .35em; border-radius: 4px; color: var(--text); }
.article-body pre { background: #0f172a; color: #e2e8f0; padding: 1rem 1.25rem;
                    border-radius: var(--radius-sm); overflow-x: auto; margin: 1.25rem 0;
                    font-size: .85rem; line-height: 1.6; }
.article-body pre code { background: none; color: inherit; padding: 0; }

.article-body table { width: 100%; border-collapse: collapse; margin: 1.25rem 0 1.75rem; font-size: .88rem; }
.article-body table th {
  background: var(--surface-3); color: var(--text); font-weight: 600;
  padding: .6rem .9rem; text-align: left; border: 1px solid var(--border);
  font-size: .8rem; text-transform: uppercase; letter-spacing: .05em;
}
.article-body table td { padding: .55rem .9rem; border: 1px solid var(--border);
                         color: var(--text-muted); vertical-align: top; line-height: 1.5; }
.article-body table tr:nth-child(even) td { background: var(--surface-2); }

.article-body blockquote {
  border-left: 4px solid var(--brand); background: var(--brand-light);
  margin: 1.25rem 0; padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text); font-size: .95rem; font-style: normal;
}
.article-body blockquote p { color: var(--text); margin-bottom: .5rem; }
.article-body .callout { background: #f0fdf4; border: 1px solid #bbf7d0;
                         border-radius: var(--radius); padding: .9rem 1.2rem; margin: 1.25rem 0;
                         font-size: .88rem; color: #166534; line-height: 1.6; }
.article-body .callout-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }

.dash-nav-link { display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1.25rem;
                 font-size: 0.9rem; color: var(--text); border-bottom: 1px solid var(--border);
                 transition: all 0.15s; }
.dash-nav-link:last-child { border-bottom: none; }
.dash-nav-link:hover, .dash-nav-link.active { background: var(--brand-light); color: var(--brand); }

/* ---------------- Guide hub cards ---------------- */
.blog-featured {
  display: block; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: inherit; margin-bottom: 2rem;
  transition: box-shadow .2s, transform .2s;
}
.blog-featured:hover { box-shadow: 0 12px 32px rgba(0,0,0,.1); transform: translateY(-2px); }
.blog-featured-grid { display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; }
.blog-featured-img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; }
.blog-featured-body { padding: 2rem 2rem 1.75rem; display: flex; flex-direction: column;
                      justify-content: center; gap: .75rem; }
.blog-featured-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em;
                       text-transform: uppercase; color: var(--brand); }
.blog-featured-title { font-size: 1.5rem; font-weight: 800; line-height: 1.3; color: var(--text); margin: 0; }
.blog-featured-excerpt { font-size: .95rem; color: var(--text-muted); line-height: 1.7; margin: 0;
                         display: -webkit-box; -webkit-line-clamp: 3;
                         -webkit-box-orient: vertical; overflow: hidden; }
.blog-featured-meta { font-size: .82rem; color: var(--text-light); display: flex;
                      align-items: center; gap: .75rem; }
.blog-featured-cta { display: inline-flex; align-items: center; gap: .35rem;
                     font-size: .85rem; font-weight: 600; color: var(--brand); margin-top: .25rem; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.blog-card { display: flex; flex-direction: column; background: var(--surface);
             border: 1px solid var(--border); border-radius: var(--radius);
             text-decoration: none; color: inherit; overflow: hidden;
             transition: box-shadow .2s, transform .2s; }
.blog-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.09); transform: translateY(-2px); }
.blog-card-img { height: 150px; object-fit: cover; width: 100%; background: var(--surface-3); }
.blog-card-accent { height: 4px; flex-shrink: 0; }
.blog-card-body { padding: 1.25rem 1.25rem 1rem; display: flex; flex-direction: column;
                  flex: 1; gap: .5rem; }
.blog-card-category { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.blog-card-title { font-size: .97rem; font-weight: 700; line-height: 1.45; color: var(--text);
                   margin: 0; -webkit-line-clamp: 3; display: -webkit-box;
                   -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-excerpt { font-size: .83rem; color: var(--text-muted); line-height: 1.6;
                     -webkit-line-clamp: 2; display: -webkit-box;
                     -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.blog-card-meta { display: flex; align-items: center; justify-content: space-between;
                  font-size: .76rem; color: var(--text-light); padding-top: .5rem;
                  border-top: 1px solid var(--border); margin-top: auto; }

/* ---------------- FAQ details ---------------- */
.faq-list details { border-bottom: 1px solid var(--border); padding: .75rem 0; }
.faq-list details:last-child { border-bottom: none; }
.faq-list summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--text);
                    list-style: none; display: flex; justify-content: space-between;
                    align-items: center; gap: .75rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary svg { flex-shrink: 0; transition: transform .18s; color: var(--text-light); }
.faq-list details[open] summary svg { transform: rotate(180deg); }
.faq-list .faq-a { padding: .6rem 0 .25rem; font-size: .87rem; color: var(--text-muted); line-height: 1.7; }

/* ---------------- Wallet dashboard ---------------- */
.wallet-layout { display: grid; grid-template-columns: 230px 1fr; gap: 1.5rem; align-items: start; }
.wallet-sidebar .dash-nav-link { border-bottom: none; border-radius: var(--radius-sm);
                                 padding: .6rem .9rem; font-size: .88rem; }
.wallet-item { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.25rem;
               border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.wallet-item:hover { background: var(--surface-2); }
.wallet-item:last-child { border-bottom: none; }
.wallet-item-icon { width: 38px; height: 38px; border-radius: var(--radius-sm); flex-shrink: 0;
                    display: flex; align-items: center; justify-content: center;
                    font-weight: 700; font-size: .95rem; color: #fff; }
.wallet-item-name { font-weight: 600; font-size: .92rem; color: var(--text); }
.wallet-item-sub { font-size: .78rem; color: var(--text-muted); }

.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 500;
                 display: none; align-items: flex-start; justify-content: center;
                 padding: 4rem 1rem 2rem; overflow-y: auto; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-lg); width: 100%;
         max-width: 520px; box-shadow: 0 24px 64px rgba(0,0,0,.25); }
.modal-header { display: flex; align-items: center; justify-content: space-between;
                padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.modal-body { padding: 1.5rem; }

/* ---------------- Code blocks (docs) ---------------- */
.code-block { background: #0f172a; color: #e2e8f0; padding: 1rem 1.25rem;
              border-radius: var(--radius-sm); overflow-x: auto; margin: 0 0 1rem;
              font-family: var(--mono); font-size: .82rem; line-height: 1.6; }
.code-block .tok-k { color: #7dd3fc; }
.code-block .tok-s { color: #86efac; }
.code-block .tok-c { color: #64748b; }

/* ---------------- Footer ---------------- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-brand { font-size: 1.35rem; font-weight: 800; color: #34d399; margin-bottom: 0.75rem; }
.footer-desc { font-size: 0.875rem; line-height: 1.6; margin-bottom: 0; color: #94a3b8; }
.footer-heading { font-weight: 700; color: #e2e8f0; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 1rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: #94a3b8; font-size: 0.875rem; transition: color 0.15s; }
.footer-links a:hover { color: #34d399; }
.footer-bottom {
  border-top: 1px solid #1e293b; padding-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem;
  flex-wrap: wrap; gap: .5rem;
}

/* ---------------- Utilities ---------------- */
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-brand { color: var(--brand); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; }
.pt-4 { padding-top: 1rem; }
.hidden { display: none; }

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: .5; }
}
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
            background: #22c55e; animation: pulse-dot 1.5s infinite; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: 1fr 260px; }
  .article-toc-sidebar { display: none; }
}
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-featured-grid { grid-template-columns: 1fr; }
  .blog-featured-img { min-height: 180px; max-height: 220px; }
}
@media (max-width: 768px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile-panel { display: block; visibility: hidden; pointer-events: none; }
  .nav-mobile-panel.open { visibility: visible; pointer-events: auto; }
  .container, .container-sm, .container-lg { padding: 0 1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid > div:first-child { grid-column: 1 / -1; border-bottom: 1px solid #1e293b; padding-bottom: 1.5rem; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .hero h1 { font-size: 1.9rem; }
  .section { padding: 2rem 0; }
  .article-layout { grid-template-columns: 1fr; }
  .article-related-sidebar { position: static; }
  .wallet-layout { grid-template-columns: 1fr; }
  .pw-output-text { font-size: 1.05rem; }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  h1 { font-size: 1.4rem; }
  .container, .container-sm { padding: 0 .75rem; }
  .card-body { padding: .875rem; }
  .modal { border-radius: var(--radius); }
}

/* ============================================================
   CONSOLE (user dashboard + admin) - GoTo.now-style shell
   ============================================================ */

.console { display: grid; grid-template-columns: 230px minmax(0, 1fr);
           max-width: 1380px; margin: 0 auto; min-height: 72vh; }
.con-side { background: var(--surface); border-right: 1px solid var(--border); padding: 20px 14px; }
.con-brandline { font-size: .67rem; font-weight: 700; letter-spacing: .09em;
                 text-transform: uppercase; color: var(--text-light); padding: 0 12px 10px; }
.con-nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px;
           border-radius: 8px; color: var(--text); font-weight: 600; font-size: .9rem;
           text-decoration: none; margin-bottom: 2px; cursor: pointer;
           background: none; border: 0; width: 100%; text-align: left; font-family: var(--font); }
.con-nav svg { color: var(--text-muted); flex-shrink: 0; }
.con-nav:hover { background: var(--surface-2); color: var(--text); }
.con-nav.active { background: var(--brand-light); color: var(--brand-dark);
                  box-shadow: inset 3px 0 0 var(--brand); }
.con-nav.active svg { color: var(--brand); }
.con-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
             display: inline-flex; align-items: center; justify-content: center;
             border-radius: 999px; background: #e11d48; color: #fff;
             font-size: .68rem; font-weight: 700; line-height: 1; }
.con-divider { border-top: 1px solid var(--border); margin: 12px 4px; }
.con-main { padding: 18px 26px 60px; background: var(--surface-2); min-width: 0; }
.con-topbar { display: flex; align-items: center; justify-content: space-between;
              gap: 16px; padding: 6px 0 18px; flex-wrap: wrap; }
.con-top-right { display: flex; align-items: center; gap: 12px; }
.con-plan { background: var(--brand-light); color: var(--brand-dark); font-weight: 700;
            font-size: .72rem; border-radius: 8px; padding: 5px 12px; }
.con-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand);
              color: #fff; font-weight: 800; display: flex; align-items: center;
              justify-content: center; font-size: .92rem; }
.con-user { font-weight: 700; font-size: .85rem; }
.con-iconbtn { color: var(--text-muted); display: inline-flex; background: none;
               border: 0; cursor: pointer; padding: 4px; border-radius: 6px; }
.con-iconbtn:hover { color: var(--brand); background: var(--surface-3); }

/* KPI tiles - first child inverts to a hero tile */
.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-row.kpi-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-row.kpi-3 { grid-template-columns: repeat(3, 1fr); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
       padding: 16px 18px; }
.kpi-num { font-size: clamp(1.2rem, 2.2vw, 1.7rem); font-weight: 900; color: var(--brand);
           line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi:first-child { background: #0f172a; border-color: #0f172a; }
.kpi:first-child .kpi-num { color: #34d399; }
.kpi:first-child .kpi-lbl { color: #94a3b8; }
.kpi-lbl { font-size: .78rem; color: var(--text-muted); font-weight: 600; margin-top: 3px; }
.kpi-sub { font-size: .72rem; color: var(--text-light); margin-top: 2px; }

/* Panels */
.chart-card { background: var(--surface); border: 1px solid var(--border);
              border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 18px; }
.chart-card h2 { font-size: 1rem; margin-bottom: 14px; color: var(--text);
                 border-left: 4px solid var(--brand); padding-left: 10px; }
.chart-card h3 { font-size: .95rem; margin-bottom: 10px; }
.chart-title-row { display: flex; justify-content: space-between; align-items: baseline;
                   gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.chart-note { font-size: .78rem; color: var(--text-light); font-weight: 600; }

/* Horizontal bars */
.hbar-row { display: grid; grid-template-columns: 180px 1fr 60px; align-items: center;
            gap: 10px; padding: 5px 0; }
.hbar-label { font-size: .84rem; font-weight: 600; color: var(--text); overflow: hidden;
              text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { display: block; background: var(--surface-3); border-radius: 4px;
              height: 12px; overflow: hidden; }
.hbar-fill { display: block; background: var(--brand); height: 100%; border-radius: 4px;
             min-width: 2px; }
.hbar-val { font-size: .8rem; font-weight: 700; color: var(--text-muted);
            text-align: right; font-variant-numeric: tabular-nums; }

/* Column chart */
.colchart { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 10px; }
.colchart .col { flex: 1; display: flex; flex-direction: column; align-items: center;
                 justify-content: flex-end; height: 100%; min-width: 0; }
.colchart .col-bar { width: 100%; background: var(--brand); border-radius: 3px 3px 0 0;
                     min-height: 2px; }
.colchart .col-lbl { font-size: .6rem; color: var(--text-light); margin-top: 4px;
                     white-space: nowrap; }

/* Console list rows */
.con-row { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 14px;
           align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--border); }
.con-row:last-child { border-bottom: 0; }
.con-row-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-light);
                color: var(--brand-dark); display: flex; align-items: center;
                justify-content: center; font-weight: 800; font-size: .95rem; }
.con-row-title { font-weight: 700; font-size: .93rem; color: var(--text); }
.con-row-sub { color: var(--text-muted); font-size: .8rem; overflow: hidden;
               text-overflow: ellipsis; white-space: nowrap; }
.con-row-actions { display: flex; gap: 6px; }

.con-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.con-section { display: none; }
.con-section.active { display: block; }

.health-ring { display: flex; align-items: center; gap: 1rem; }
.health-score { font-size: 2.4rem; font-weight: 900; line-height: 1;
                font-variant-numeric: tabular-nums; }

@media (max-width: 1024px) {
  .console { grid-template-columns: 1fr; }
  .con-side { display: flex; align-items: center; gap: 6px; overflow-x: auto;
              border-right: 0; border-bottom: 1px solid var(--border); padding: 10px 14px; }
  .con-side nav { display: flex; gap: 4px; }
  .con-brandline { display: none; }
  .con-nav { white-space: nowrap; width: auto; }
  .con-nav.active { box-shadow: inset 0 -3px 0 var(--brand); }
  .con-divider { display: none; }
}
@media (max-width: 860px) {
  .kpi-row, .kpi-row.kpi-4, .kpi-row.kpi-3 { grid-template-columns: repeat(2, 1fr); }
  .hbar-row { grid-template-columns: 110px 1fr 52px; }
  .con-main { padding: 14px 14px 40px; }
}
