/* ═══ Scoped design header + footer for THEMED pages (blog, how-to, etc.) ══
   Loads alongside the theme's main.css. Every rule is confined to .hd / .ft
   (and the CSS variables + font are scoped to them too) so the design menu
   matches the landing pages WITHOUT restyling the themed page body.        */

.hd, .ft {
  --bg: #ffffff; --bg-2: #f5f7fa; --surf: #ffffff; --surf-2: #eef1f6;
  --ink: #0d1220; --ink-2: #3c4557; --ink-3: #69738a; --ink-4: #9aa3b5;
  --line: rgba(13,18,32,.09); --line-2: rgba(13,18,32,.16);
  --accent: #3b5cff; --accent-ink: #1d3a8a; --dark: #0b0e14; --dark-line: rgba(255,255,255,.09);
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px;
  --shadow-card: 0 1px 0 rgba(13,18,32,.04), 0 1px 2px rgba(13,18,32,.05);
  --maxw: 1140px;
  font-family: var(--sans);
}
.hd *, .ft * { box-sizing: border-box; }
.hd a, .ft a { text-decoration: none; }

/* container + buttons (scoped — the theme also defines .btn) */
.hd .wrap, .ft .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.hd .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; letter-spacing: -0.01em; white-space: nowrap; cursor: pointer;
  transition: background .14s, border-color .14s, color .14s; }
.hd .btn-accent { background: var(--accent); color: #fff; }
.hd .btn-accent:hover { background: #2e4ce6; color: #fff; }
.hd .btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

/* ─── Header ──────────────────────────────────────────── */
.hd { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s; }
.hd.is-scrolled { border-bottom-color: var(--line); }
.hd-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.hd-logo { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.hd-word { font-weight: 650; font-size: 17px; letter-spacing: -0.02em; }
.hd-word .i { color: var(--accent); }
.hd-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.hd-link { position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.hd-link:hover { background: var(--surf-2); color: var(--ink); }
.hd-new { font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: #fff; background: var(--accent); border-radius: 5px; padding: 2px 5px; }
.hd-right { display: flex; align-items: center; gap: 10px; }
.hd-login { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 8px 10px; border-radius: 8px; }
.hd-login:hover { color: var(--ink); background: var(--surf-2); }
.hd-drop-wrap { position: relative; }
.hd-drop { position: absolute; top: calc(100% + 6px); left: 0; min-width: 460px;
  background: var(--surf); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 16px 48px rgba(13,18,32,.14), 0 2px 8px rgba(13,18,32,.06);
  padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  opacity: 0; pointer-events: none; transform: translateY(-4px); transition: opacity .14s, transform .14s; }
.hd-drop-wrap:hover .hd-drop, .hd-drop-wrap:focus-within .hd-drop { opacity: 1; pointer-events: auto; transform: none; }
.hd-drop a { display: flex; gap: 11px; padding: 10px 11px; border-radius: 10px; color: var(--ink); align-items: flex-start; }
.hd-drop a:hover { background: var(--bg-2); }
.hd-drop-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--surf-2); color: var(--accent);
  display: grid; place-items: center; flex-shrink: 0; }
.hd-drop-t { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.hd-drop-d { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

/* ─── Footer ──────────────────────────────────────────── */
.ft { background: var(--dark); color: rgba(232,235,242,.65); border-top: 1px solid var(--dark-line); }
.ft-in { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; padding: 56px 0 40px; }
@media (max-width: 900px) { .ft-in { grid-template-columns: 1fr 1fr; } }
.ft-brand { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.ft-brand .hd-logo { color: #fff; }
.ft-tag { font-size: 13px; max-width: 30ch; line-height: 1.55; }
.ft-col-t { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(232,235,242,.4); margin-bottom: 14px; }
.ft-col { display: flex; flex-direction: column; gap: 9px; }
.ft-col a { font-size: 13.5px; color: rgba(232,235,242,.7); display: inline-flex; align-items: center; gap: 7px; }
.ft-col a:hover { color: #fff; }
.ft-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 20px 0 28px; border-top: 1px solid var(--dark-line); font-size: 12.5px; color: rgba(232,235,242,.4); }
.ft-word { font-weight: 650; font-size: 16px; letter-spacing: -0.02em; color: #fff; }
.ft-word .i { color: #9db1ff; }
/* ─── Language switcher (header flyout + footer row) ─────── */
.hd-lang .hd-lang-btn { cursor: pointer; }
.hd-lang-flag { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; flex-shrink: 0; }
.hd-lang-cur { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.hd-lang-drop { left: auto; right: 0; min-width: 320px; grid-template-columns: 1fr 1fr; }
.hd-lang-drop a { align-items: center; gap: 9px; padding: 8px 10px; }
.hd-lang-drop img { width: 20px; height: 15px; border-radius: 3px; flex-shrink: 0; object-fit: cover; }
.hd-lang-name { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.hd-lang-drop a:hover .hd-lang-name { color: var(--ink); }
.hd-lang-drop a.is-active { background: var(--surf-2); }
.hd-lang-drop a.is-active .hd-lang-name { color: var(--ink); font-weight: 600; }
@media (max-width: 480px) { .hd-lang-drop { min-width: 260px; left: auto; right: 0; } }

.ft-lang { padding: 4px 0 24px; }
.ft-lang .ft-col-t { margin-bottom: 12px; }
.ft-lang-row { display: flex; flex-wrap: wrap; gap: 9px 18px; }
.ft-lang-row a { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: rgba(232,235,242,.7); }
.ft-lang-row a:hover { color: #fff; }
.ft-lang-row img { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; }
.ft-lang-row a.is-active { color: #fff; font-weight: 600; }
