/* ────────────────────────────────────────────────────────────
   2FA Gen — Stylesheet
   Light theme, responsive, accessible, two-column card layout
   ──────────────────────────────────────────────────────────── */

/* ── Hidden attribute override ───────────────────────────── */
[hidden] { display: none !important; }

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:         #f8fafc;
  --bg-surface: #ffffff;
  --bg-hover:   #f1f5f9;
  --border:     #e2e8f0;
  --text:       #1e293b;
  --text-sec:   #64748b;
  --accent:     #0891b2;
  --accent-hover:#0e7490;
  --accent-bg:  #ecfeff;
  --success:    #059669;
  --success-bg: rgba(5, 150, 105, 0.08);
  --warning:    #d97706;
  --error:      #dc2626;
  --error-bg:   #fef2f2;
  --ring-bg:    #e2e8f0;
  --nav-bg:     rgba(248,250,252,0.92);
  --shadow:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg:  0 4px 16px rgba(0,0,0,0.08);
  --radius:     12px;
  --radius-sm:  8px;
  --font:       system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono:       'SF Mono', ui-monospace, 'Cascadia Code', 'Fira Code', Menlo, monospace;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.3; }

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.25rem; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
/* The tool gets its own wider track — .container's 900px cap was clamping the card */
.container-tool { max-width: 1060px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}
.nav-brand:hover { color: var(--accent); text-decoration: none; }
.nav-logo { width: 32px; height: 32px; display: block; flex: none; }
.brand-accent { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-sec);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--accent);
  text-decoration: none;
}
#nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
}
@media (max-width: 768px) {
  #nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
  }
  /* Hide nav menu on mobile when toggle is collapsed */
  #nav-toggle[aria-expanded="false"] ~ .nav-links { display: none; }
  .nav-links a { font-size: 1rem; }
}

/* ── Hero — compact, tool-first ──────────────────────────── */
.hero {
  padding: 2.25rem 0 0;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.hero h1 .accent { color: var(--accent); }

.trust-badges {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-sec);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}
.badge-icon { font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════
   TOOL CARD — Two-Column Layout
   ═══════════════════════════════════════════════════════════ */
.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3.25rem 3.5rem;
  margin: 1.5rem auto 3rem;
  max-width: 1000px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 32px -12px rgba(15, 23, 42, 0.12),
    0 32px 64px -32px rgba(15, 23, 42, 0.14);
}

/* Two-column grid */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.25rem;
  /* The key field now sits full-width above this row, so the action and the
     code display should hang from the top of it rather than float in the
     middle of whichever column happens to be taller. */
  align-items: start;
}
.card-left { display: flex; flex-direction: column; justify-content: flex-start; }

/* Responsive: stack on narrow screens */
@media (max-width: 640px) {
  .tool-card {
    padding: 2rem 1.4rem;
    border-radius: 20px;
    margin-bottom: 2rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .card-right {
    padding-left: 0 !important;
    border-left: none !important;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
  }
}

/* ── LEFT SIDE: Input ─────────────────────────────────────── */
.input-instruction {
  font-size: 1rem;
  color: var(--text-sec);
  margin: 0 0 0.75rem;
  font-weight: 500;
}

/* ── Key field ───────────────────────────────────────────────
   A 2FA secret is one unbroken token. The old field was a <textarea>
   that grew downward as the key got longer, so the card changed height
   between a 16- and a 32-character key and the layout jumped. This is a
   single-line input of FIXED height spanning the full card width, with
   the type size fitted to the key by js/app.js. Height never changes;
   only the glyph size does, and only down to a legible floor. */
.key-row { margin-bottom: 2rem; }

.key-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;                 /* lets the field shrink inside grid/flex parents */
  height: 4.75rem;              /* fixed — the whole point */
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.key-field:focus-within {
  border-color: var(--accent);
  background: var(--bg-surface);
  box-shadow: 0 0 0 4px var(--accent-bg);
}
.key-field.is-invalid { border-color: var(--error); }
.key-field.is-invalid:focus-within { box-shadow: 0 0 0 4px var(--error-bg); }

.key-input {
  flex: 1 1 auto;
  min-width: 0;                 /* without this a long value pushes the page sideways */
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 1.5rem;
  font-family: var(--mono);
  font-size: 1.35rem;           /* js lowers this to fit; never raised above it */
  letter-spacing: 0.04em;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: inherit;
  outline: none;
  text-overflow: clip;
  transition: font-size 0.12s ease-out, letter-spacing 0.12s ease-out;
}
.key-input::placeholder {
  color: var(--text-sec);
  opacity: 0.75;
  letter-spacing: 0.01em;
}
.key-input::-webkit-scrollbar { height: 0; }

/* Edge fades, set by app.js only on a side that really has hidden text. */
.key-field::before,
.key-field::after {
  content: '';
  position: absolute;
  top: 2px; bottom: 2px;
  width: 2.75rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.key-field::before {
  left: 2px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(to left, transparent, var(--bg) 75%);
}
.key-field::after {
  right: 2px;
  border-radius: 0 14px 14px 0;
  background: linear-gradient(to right, transparent, var(--bg) 75%);
}
.key-field.fade-left::before  { opacity: 1; }
.key-field.fade-right::after  { opacity: 1; }
.key-field:focus-within::before { background: linear-gradient(to left,  transparent, var(--bg-surface) 75%); }
.key-field:focus-within::after  { background: linear-gradient(to right, transparent, var(--bg-surface) 75%); }

/* Clear button — appears only when there is something to clear. */
.key-clear {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  margin-right: 1rem;
  padding: 0;
  color: var(--text-sec);
  background: var(--bg-hover);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.key-clear:hover { color: var(--text); background: var(--border); }
.key-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Responsive key field. Only the field's own metrics change here — the
   glyph size is set by the fitter in app.js, which reads the real box
   width, so it stays correct at any viewport without a breakpoint list. */
@media (max-width: 900px) {
  .key-field { height: 4.4rem; border-radius: 14px; }
  .key-input { padding: 0 1.15rem; }
}
@media (max-width: 640px) {
  .key-row   { margin-bottom: 1.5rem; }
  .key-field { height: 4rem; }
  .key-input { padding: 0 1rem; letter-spacing: 0.03em; }
  .key-clear { width: 1.9rem; height: 1.9rem; margin-right: 0.6rem; }
}

.generate-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.2rem 1.25rem;
  font-size: 1.1rem;
  font-weight: 650;
  font-family: var(--font);
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.generate-btn:hover { background: var(--accent-hover); }
.generate-btn:active { transform: scale(0.98); }

/* Inline error below input */
.input-error {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--error);
  line-height: 1.4;
}
.input-error svg { flex-shrink: 0; }

/* Non-blocking notice — the code still generates */
.input-note {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--warning);
  line-height: 1.45;
}
.input-note svg { flex-shrink: 0; margin-top: 2px; }

/* ── RIGHT SIDE: OTP ──────────────────────────────────────── */
.card-right {
  padding-left: 3.25rem;
  border-left: 1px solid var(--border);
}

/* Clickable OTP box */
.otp-box {
  text-align: center;
  cursor: pointer;
  border-radius: 16px;
  padding: 1.35rem 1rem;
  transition: background 0.15s;
  user-select: none;
  position: relative;
}
.otp-box:hover { background: var(--accent-bg); }
.otp-box:active { transform: scale(0.98); }
.otp-box:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.otp-label {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  color: var(--text-sec);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.otp-code {
  font-family: var(--mono);
  font-size: 4.2rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  margin-bottom: 0.8rem;
  line-height: 1;
}
@media (max-width: 900px) {
  .otp-code { font-size: 3.4rem; }
}
@media (max-width: 640px) {
  .otp-code { font-size: 3.2rem; }
}
@media (max-width: 400px) {
  .otp-code { font-size: 2.5rem; }
}

/* Countdown ring */
.countdown-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.countdown-wrap {
  position: relative; width: 72px; height: 72px;
}
.countdown-svg { width: 72px; height: 72px; transform: rotate(-90deg); }
.countdown-bg { fill: none; stroke: var(--ring-bg); stroke-width: 5; }
.countdown-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s linear, stroke 0.3s;
}
.countdown-ring.warn { stroke: var(--warning); }
.countdown-ring.urgent { stroke: var(--error); }
.countdown-num {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 1.15rem; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tap-hint {
  font-size: 0.82rem; color: var(--text-sec); margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 0.3rem;
}

/* Copied toast overlay */
.copy-toast {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: var(--success);
  border-radius: 16px;
  color: #fff; font-weight: 700; font-size: 1.15rem;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.copy-toast.show { opacity: 1; }
.copy-toast svg { flex-shrink: 0; }

/* Placeholder state */
.otp-placeholder {
  text-align: center; padding: 2.25rem 0.75rem;
  color: var(--text-sec); font-size: 1rem; line-height: 1.55;
}
.otp-placeholder .ph-icon {
  width: 72px; height: 72px; margin: 0 auto 0.9rem;
  background: var(--bg-hover); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.otp-placeholder .ph-icon svg { opacity: 0.4; width: 34px; height: 34px; }

/* ── How It Works ────────────────────────────────────────── */
.how-section {
  padding: 3rem 0;
}
.how-section h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 2rem;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.step-num {
  width: 40px; height: 40px;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.step h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.step p { font-size: 0.88rem; color: var(--text-sec); margin: 0; }

/* ── Content Sections ────────────────────────────────────── */
.content-section {
  padding: 2.5rem 0;
}
.content-section + .content-section {
  border-top: 1px solid var(--border);
}
.content-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.content-section h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.content-section p {
  margin: 0 0 1rem;
  color: var(--text-sec);
}
.content-section ul, .content-section ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  color: var(--text-sec);
}
.content-section li { margin-bottom: 0.4rem; }
.content-section code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-hover);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-section { padding: 2.5rem 0; }
.faq-section h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: var(--bg-surface);
  border: none;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font);
  transition: background 0.15s;
}
.faq-question:hover { background: var(--bg-hover); }
.faq-question .faq-arrow {
  transition: transform 0.2s;
  font-size: 0.8rem;
  color: var(--text-sec);
}
.faq-question[aria-expanded="true"] .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  padding: 0 1.25rem 1rem;
  font-size: 0.9rem;
  color: var(--text-sec);
  line-height: 1.7;
}
.faq-answer p { margin: 0 0 0.75rem; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-text {
  font-size: 0.82rem;
  color: var(--text-sec);
}
.footer-links {
  display: flex;
  /* Five links with long labels (Russian, Portuguese) overflow a 360px
     screen on one line. Wrapping is what keeps the page from scrolling
     sideways once the footer is translated. */
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 640px) {
  .footer-inner { justify-content: flex-start; }
  .footer-links { gap: 0.5rem 1rem; }
  .footer-links a { font-size: 0.79rem; }
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-sec);
}
.footer-links a:hover { color: var(--accent); }

/* ── Article pages ───────────────────────────────────────── */
.article-hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.article-hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.article-hero .subtitle {
  font-size: 1.05rem;
  color: var(--text-sec);
  max-width: 600px;
  margin: 0 auto;
}
.article-body {
  padding: 2rem 0 3rem;
  max-width: 720px;
  margin: 0 auto;
}
.article-body h2 {
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.article-body h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.article-body h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}
.article-body p {
  margin: 0 0 1rem;
  color: var(--text-sec);
}
.article-body ul, .article-body ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  color: var(--text-sec);
}
.article-body li { margin-bottom: 0.3rem; }
.article-body strong { color: var(--text); }

/* ── Article: cross-language availability strip ──────────────
   Sits under the breadcrumb. Small on purpose: it is a signpost,
   not a feature. Also the link path that lets each translation
   reach the other three. */
.lang-also {
  margin: -0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-sec);
}
.lang-also a { white-space: nowrap; }
.lang-also span { margin: 0 0.15rem; color: var(--border); }

/* ── Article: related reading ────────────────────────────────
   Deliberately not a grid of cards — one bordered block holding a
   plain list reads as "more on this", which is what it is. */
.related {
  max-width: 720px;
  margin: 2.5rem auto 3rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.related h2 {
  font-size: 1.05rem;
  margin: 0 0 1.1rem;
  padding: 0;
  border: 0;
  color: var(--text);
}
.related ul {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.related li > a {
  font-weight: 600;
  font-size: 0.97rem;
}
.related li > p {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-sec);
}
@media (max-width: 640px) {
  .related { padding: 1.25rem; margin: 2rem auto 2.5rem; }
}

/* Comparison table */
.compare-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.compare-table th, .compare-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table th {
  background: var(--bg-hover);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.compare-table td { color: var(--text-sec); }
.compare-table tr:last-child td { border-bottom: none; }

/* CTA banner */
.cta-banner {
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  text-align: center;
  margin: 2rem 0;
}
.cta-banner p {
  margin: 0 0 1rem;
  color: var(--text);
  font-weight: 500;
}

/* ── Breadcrumbs ─────────────────────────────────────────── */
.breadcrumbs {
  padding: 0.75rem 0;
  font-size: 0.82rem;
  color: var(--text-sec);
}
.breadcrumbs a { color: var(--text-sec); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 0.4rem; }

/* ── Utilities ───────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ═══════════════════════════════════════════════════════════
   HOUSE AD — self-hosted only, written in at save time.
   No third-party request is ever made for this.
   ═══════════════════════════════════════════════════════════ */
.ad-section { padding: 0 0 2.5rem; }
.house-ad {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1.35rem 1.6rem;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  background: var(--accent-bg);
  border: 1px solid #a5f3fc;
  transition: transform 0.15s, box-shadow 0.15s;
}
.house-ad:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.18);
}
.house-ad--bordered { background: var(--bg-surface); border-color: var(--border); }
.house-ad--solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.house-ad__img {
  max-width: 150px; max-height: 96px; flex: none;
  border-radius: 10px; object-fit: contain;
}
.house-ad__text { display: flex; flex-direction: column; gap: 0.22rem; min-width: 0; }
.house-ad__eyebrow {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.09em;
  font-weight: 700; opacity: 0.72;
}
.house-ad__title { font-size: 1.12rem; font-weight: 700; line-height: 1.3; }
.house-ad__body { font-size: 0.9rem; opacity: 0.84; line-height: 1.5; }
.house-ad__cta {
  font-size: 0.86rem; font-weight: 650; margin-top: 0.35rem;
  text-decoration: underline; text-underline-offset: 3px;
}
/* Banner layout — the image IS the creative (GIF, PNG, JPG).
   No card chrome, no text beside it: it spans the column and scales down
   on narrow screens instead of being squashed into the logo slot. */
.house-ad--banner {
  display: block;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  text-align: center;
  line-height: 0;
}
.house-ad--banner:hover {
  transform: none;
  box-shadow: none;
  background: none;
}
.house-ad--banner .house-ad__img {
  max-width: 100%;
  max-height: none;
  width: auto;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 10px;
}

@media (max-width: 560px) {
  .house-ad { flex-direction: column; align-items: flex-start; text-align: left; padding: 1.15rem 1.2rem; }
  .house-ad__img { max-width: 100%; max-height: 130px; }
  .house-ad--banner { padding: 0; }
  .house-ad--banner .house-ad__img { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  .house-ad, .house-ad:hover { transition: none; transform: none; }
}

/* ── Language picker ─────────────────────────────────────────
   Language is offered, never forced: no IP redirect, no auto-switch.
   The menu is a list of real links so it is crawlable and works
   without JavaScript once open. */
.lang-picker { position: relative; flex: none; }

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-sec);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.lang-btn:hover { color: var(--accent); border-color: var(--accent); }
.lang-btn svg { flex: none; opacity: 0.75; }
.lang-btn span { white-space: nowrap; }

.lang-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 11rem;
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 60;
}
.lang-menu[hidden] { display: none; }
.lang-menu a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}
.lang-menu a:hover { background: var(--bg-hover); color: var(--accent); text-decoration: none; }
.lang-menu a[aria-current="true"] {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-bg);
}

@media (max-width: 768px) {
  /* Keep the language switch reachable even when the hamburger is closed,
     and put the hamburger last so it stays at the far right. */
  #nav-toggle { order: 3; margin-left: 0.25rem; }
  .lang-picker { order: 2; margin-left: auto; }
  .lang-btn { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
  .lang-menu { right: -0.25rem; }
}
@media (max-width: 380px) {
  .lang-btn span { display: none; }   /* globe only on very narrow screens */
  .lang-btn { padding: 0.45rem; }
}

/* ── Trust pages: about / security / changelog ───────────────
   Shared so the three pages stay visually identical. */
.callout-box{background:var(--accent-bg);border:1px solid var(--accent);
  border-radius:12px;padding:1rem 1.15rem;margin:0 0 1.75rem}
.callout-box p{margin:0}
.lede{font-size:1.02rem;color:var(--text-sec)}
.meta-note{font-size:.82rem;color:var(--text-sec);margin-top:2rem}
.changelog{margin:0 0 2.5rem}
.log-entry{padding:1.25rem 0 1.35rem;border-bottom:1px solid var(--border)}
.log-entry:last-child{border-bottom:none}
.log-meta{display:flex;align-items:center;gap:.6rem;font-size:.8rem;color:var(--text-sec);
  font-variant-numeric:tabular-nums;margin-bottom:.35rem}
.log-tag{background:var(--accent-bg);color:var(--accent);border-radius:5px;
  padding:.1rem .45rem;font-size:.72rem;font-weight:600}
.log-entry h3{margin:.1rem 0 .6rem;font-size:1.06rem}
.log-entry ul{margin:0}
.log-entry li{margin-bottom:.35rem}
.priv-more{margin-top:1.1rem;font-size:.94rem}
