/* ==========================================================================
   2FA.Online (clone) — stylesheet
   ========================================================================== */

:root {
  --bg: #f3f5f9;
  --card-bg: #ffffff;
  --border: #e3e6ec;
  --text: #0f172a;
  --text-muted: #64748b;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-tint: #eff6ff;
  --blue-tint-border: #bfdbfe;
  --black: #111827;
  --danger: #dc2626;
  --green: #059669;
  --green-tint: #ecfdf5;
  --green-tint-border: #a7f3d0;
  --purple: #7c3aed;
  --purple-tint: #f5f3ff;
  --purple-tint-border: #ddd6fe;
  --orange: #ea580c;
  --orange-tint: #fff7ed;
  --orange-tint-border: #fed7aa;
  --red-tint: #fef2f2;
  --red-tint-border: #fecaca;
  --pill-bg: #f1f5f9;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --header-h: 64px;
}

html[data-theme='dark'] {
  --bg: #0b0f19;
  --card-bg: #161b28;
  --border: #262d3d;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --blue-tint: #12213f;
  --blue-tint-border: #1e3a6b;
  --black: #f1f5f9;
  --green-tint: #0c2620;
  --green-tint-border: #164e3f;
  --purple-tint: #201a3a;
  --purple-tint-border: #3a2e6e;
  --orange-tint: #2a1c10;
  --orange-tint-border: #5c3517;
  --red-tint: #2a1414;
  --red-tint-border: #5c2323;
  --pill-bg: #1e2434;
}

html[data-theme='dark'] .btn-dark { color: #0b0f19; }
html[data-theme='dark'] .badge-active { background: var(--blue); color: #fff; }

* { box-sizing: border-box; }
/* Author styles (e.g. `.overlay { display: flex }`) share specificity with
   the UA's `[hidden]` rule and can win by source order — force it. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 200;
  background: var(--card-bg);
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: inherit; text-decoration: none; }

/* desktop nav hidden until ≥1024px breakpoint */
.desktop-nav { display: none; }

/* ---------------- Header ---------------- */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.shield-icon { width: 28px; height: 28px; color: var(--blue); flex-shrink: 0; }
.shield-icon.small { width: 20px; height: 20px; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { background: var(--pill-bg); }
.icon-btn .icon { width: 20px; height: 20px; }

.icon-moon, .icon-close { display: none; }
html[data-theme='dark'] .icon-sun { display: none; }
html[data-theme='dark'] .icon-moon { display: inline-block; }
.menu-open .icon-menu { display: none; }
.menu-open .icon-close { display: inline-block; }

.mobile-menu {
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}
.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 8px 20px 16px;
}
.mobile-menu-inner a {
  padding: 10px 4px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-inner a:last-child { border-bottom: none; }
.mobile-menu-inner a:hover { color: var(--blue); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: .95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 10px 18px;
  cursor: pointer;
  background: var(--card-bg);
  color: var(--text);
}
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.icon-sm { width: 16px; height: 16px; }

.btn-outline { background: var(--card-bg); border: 1px solid var(--border); }
.btn-danger { color: var(--danger); border-color: var(--border); }
.btn-danger:hover { background: var(--red-tint); border-color: var(--red-tint-border); }

.btn-dark {
  background: var(--black);
  color: #fff;
  border-color: var(--black);
}
.btn-dark:hover { opacity: .9; }

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover { background: var(--blue-dark); }

.btn-block { width: 100%; }

/* header-only-desktop: hide on mobile, show on desktop */
.header-only-desktop { display: none; }

/* Encrypt button states */
.btn-encrypt { color: var(--blue); border-color: var(--blue-tint-border); }
.btn-encrypt:hover { background: var(--blue-tint); }
.btn-encrypted { color: var(--green); border-color: var(--green-tint-border); background: var(--green-tint); }
.btn-encrypted:hover { opacity: .85; }

/* Mobile menu buttons (History / Refresh) */
.mobile-menu-inner button {
  padding: 10px 4px;
  color: var(--text-muted);
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  text-align: left;
  width: 100%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}
.mobile-menu-inner button:last-child { border-bottom: none; }
.mobile-menu-inner button svg { width: 16px; height: 16px; flex-shrink: 0; }
.mobile-menu-inner button:hover { color: var(--blue); }

/* ---------------- Hero ---------------- */
.hero {
  text-align: center;
  padding: 12px 20px 16px;
}
.hero h1 {
  font-size: clamp(1.4rem, 6vw, 2.4rem);
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.hero-sub2 {
  font-size: .95rem;
  color: var(--text-muted);
  margin: 0 0 28px;
}
.hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-actions .btn {
  padding: 8px 14px;
  font-size: .85rem;
  white-space: nowrap;
}

/* ---------------- Card ---------------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ---------------- Sponsor section ---------------- */
.sponsor-section { padding: 8px 20px 32px; }
.sponsor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-bottom: 16px;
}
.sponsor-head h2 { font-size: 1.15rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.sponsor-head-icon { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill-gray { background: var(--pill-bg); color: var(--text-muted); }
.pill-green { background: #d1fae5; color: #047857; }
.pill-blue { background: #dbeafe; color: #1d4ed8; }

.sponsor-card {
  background: var(--blue-tint);
  border: 1px solid var(--blue-tint-border);
  border-radius: var(--radius);
  padding: 20px;
}
.sponsor-partner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sponsor-partner-row strong { font-size: 1.2rem; color: var(--blue); }
.sponsor-headline { font-size: 1.1rem; font-weight: 700; margin: 0 0 12px; }
.sponsor-body {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.sponsor-features {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.sponsor-feature {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.sponsor-feature-icon { width: 26px; height: 26px; display: block; margin: 0 auto 8px; color: var(--blue); }
.sponsor-feature h3 { font-size: .95rem; margin: 0 0 4px; }
.sponsor-feature p { font-size: .82rem; color: var(--text-muted); margin: 0; }

.sponsor-trust {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
}

/* ---------------- Generator ---------------- */
.generator { padding: 8px 0 24px; display: flex; flex-direction: column; gap: 16px; }

/* ---------------- Centered generator below hero ---------------- */
.generator-centered {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px 8px;
}

/* ---------------- Page grid wrapper (index) ---------------- */
.page-grid { padding: 0 20px 40px; }
.page-main  { display: flex; flex-direction: column; gap: 16px; }
.page-sidebar { display: flex; flex-direction: column; gap: 16px; }

#accountsList { display: flex; flex-direction: column; gap: 16px; }

.backup-row { display: flex; gap: 12px; }
.backup-row .btn { flex: 1; }

.account-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.account-card-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: -4px;
}
.remove-account-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-sm);
}
.remove-account-btn:hover { color: var(--danger); background: var(--red-tint); }
.remove-account-btn svg { width: 16px; height: 16px; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text);
}
.field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.secret-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.secret-input-wrap input {
  flex: 1;
  min-width: 0;
  /* hide browser's built-in password reveal button */
  -webkit-appearance: none;
}
.secret-input-wrap input::-ms-reveal,
.secret-input-wrap input::-ms-clear { display: none; }
.toggle-visibility {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
}
.toggle-visibility:hover { background: var(--pill-bg); }
.toggle-visibility svg { width: 18px; height: 18px; display: block; }

.code-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
}
.code-value {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: .06em;
  cursor: pointer;
  user-select: none;
  margin: 0 0 12px;
}
.code-error { color: var(--danger); font-size: .85rem; margin: 0; }
.code-meta { display: flex; align-items: center; justify-content: center; gap: 10px; }

.badge-active {
  background: var(--black);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}
.copy-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
}
.copy-btn:hover { background: var(--pill-bg); }
.copy-btn svg { width: 16px; height: 16px; }
.copy-btn.copied { color: var(--green); border-color: var(--green-tint-border); }

@keyframes codeFlash {
  0%   { opacity: 1; }
  40%  { opacity: .3; }
  100% { opacity: 1; }
}
.code-flash { animation: codeFlash .4s ease; }

/* Timer */
.timer-card {
  display: flex;
  align-items: center;
  gap: 16px;
}
.timer-card svg { width: 26px; height: 26px; color: var(--blue); flex-shrink: 0; }
.timer-card > div { flex: 1; }
#timerText { margin: 0 0 8px; font-weight: 600; }
.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--pill-bg);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 999px;
  transition: width 1s linear;
  width: 100%;
}

/* ---------------- How to use / generic content cards ---------------- */
.howto, .content-section { max-width: 680px; margin: 0 auto 0; }
.howto { }
.howto h2 { margin: 0 0 14px; font-size: 1.3rem; }
.howto ul { margin: 0; padding-left: 20px; }
.howto li { margin-bottom: 10px; color: var(--text-muted); }
.howto li:last-child { margin-bottom: 0; }

/* ---------------- About page ---------------- */
.about-hero {
  text-align: center;
  padding: 48px 20px 24px;
}
.about-hero .shield-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
}
.about-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 16px;
}
.about-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

.section-stack { display: flex; flex-direction: column; gap: 16px; padding: 0 20px 40px; max-width: 900px; margin: 0 auto; }

/* about page sub-grids (stack on mobile, grid on desktop) */
.features-grid   { display: flex; flex-direction: column; gap: 16px; }
.about-bottom-grid { display: flex; flex-direction: column; gap: 16px; }

.mission-card h2 { margin: 0 0 10px; font-size: 1.2rem; }
.mission-card p { color: var(--text-muted); margin: 0; }

.feature-card {
  border-radius: var(--radius);
  border: 1px solid;
  padding: 22px;
}
.feature-card .feature-icon { width: 26px; height: 26px; margin-bottom: 10px; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.feature-card p { margin: 0 0 14px; color: var(--text-muted); }

.feature-card.green,
.feature-card.blue,
.feature-card.purple,
.feature-card.orange  { background: var(--card-bg); border-color: var(--border); }

.feature-card.green  .feature-icon { color: var(--green); }
.feature-card.green  .pill { background: #d1fae5; color: var(--green); }

.feature-card.blue   .feature-icon { color: var(--blue); }
.feature-card.blue   .pill { background: #dbeafe; color: var(--blue-dark); }

.feature-card.purple .feature-icon { color: var(--purple); }
.feature-card.purple .pill { background: #ede9fe; color: var(--purple); }

.feature-card.orange .feature-icon { color: var(--orange); }
.feature-card.orange .pill { background: #ffedd5; color: var(--orange); }

.howto-work-card h2 { margin: 0 0 16px; font-size: 1.2rem; }
.howto-steps { display: flex; flex-direction: column; gap: 18px; }
.howto-step { display: flex; gap: 14px; }
.step-num {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.howto-step h3 { margin: 0 0 4px; font-size: 1rem; }
.howto-step p { margin: 0; color: var(--text-muted); }

.security-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.security-card h2 { margin: 0 0 16px; font-size: 1.2rem; }
.security-item { margin-bottom: 14px; color: var(--text-muted); }
.security-item:last-child { margin-bottom: 0; }
.security-item strong { color: var(--text); }

.faq-card h2 { margin: 0 0 16px; font-size: 1.2rem; }
.faq-item { margin-bottom: 16px; }
.faq-item:last-child { margin-bottom: 0; }
.faq-item h3 { margin: 0 0 6px; font-size: 1rem; }
.faq-item p { margin: 0; color: var(--text-muted); }

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 20px 40px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 14px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 14px;
}
.footer-links a { color: var(--text-muted); font-size: .9rem; }
.footer-links a:hover { color: var(--blue); }
.footer-copy { color: var(--text-muted); font-size: .82rem; margin: 0; }

/* ---------------- PIN lock / setup overlays ---------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}
.overlay-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  width: 100%;
  max-width: 340px;
  text-align: center;
}
.overlay-card .shield-icon { width: 40px; height: 40px; margin: 0 auto 14px; display: block; }
.overlay-card h2 { margin: 0 0 8px; font-size: 1.3rem; }
.overlay-sub { color: var(--text-muted); font-size: .88rem; margin: 0 0 18px; }
.pin-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.4rem;
  text-align: center;
  letter-spacing: .3em;
  background: var(--card-bg);
  color: var(--text);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.pin-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.overlay-error { color: var(--danger); font-size: .85rem; margin: 0 0 14px; }
.overlay-card .btn-block { margin-bottom: 10px; }
.overlay-card .btn-block:last-child { margin-bottom: 0; }

/* ---------------- History Panel ---------------- */
.history-panel {
  position: fixed;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.14);
  padding: 20px;
  width: 360px;
  max-width: calc(100vw - 32px);
  z-index: 99;
  max-height: 70vh;
  overflow-y: auto;
}

.history-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.history-panel-head svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.history-panel-head h3 { margin: 0; font-size: 1rem; font-weight: 700; }

.history-list { display: flex; flex-direction: column; gap: 10px; }

.history-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.history-item:hover { border-color: var(--blue); background: var(--blue-tint); }

@keyframes cardHighlight {
  0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, .5); }
  50%  { box-shadow: 0 0 0 6px rgba(37, 99, 235, .2); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}
.card-highlight { animation: cardHighlight 1.2s ease; }
.history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.history-item-name { font-weight: 600; font-size: .92rem; }
.history-item-badge {
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--pill-bg);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.history-item-secret {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .88rem;
  color: var(--blue);
  margin-bottom: 4px;
  letter-spacing: .04em;
}
.history-encrypted { color: var(--text-muted); font-style: italic; font-family: inherit; }
.history-item-meta { font-size: .78rem; color: var(--text-muted); }
.history-empty { color: var(--text-muted); font-size: .9rem; text-align: center; padding: 12px 0; margin: 0; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #f1f5f9;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------------- Responsive ---------------- */
@media (min-width: 560px) {
  .sponsor-features { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: clamp(1.4rem, 6vw, 2.4rem); }
}

@media (min-width: 720px) {
  .container { max-width: 760px; }
  .code-value { font-size: 2.8rem; }
}

/* ========================================================
   Desktop layout  (≥ 1024 px)
   ======================================================== */
@media (min-width: 1024px) {

  /* ----- Container ----- */
  .container { max-width: 1220px; }

  /* ----- Header ----- */
  .header-only-desktop { display: inline-flex; }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    margin: 0 24px;
  }
  .desktop-nav .nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: .95rem;
    white-space: nowrap;
  }
  .desktop-nav .nav-link:hover { color: var(--text); background: var(--pill-bg); }
  .desktop-nav .nav-link.active { color: var(--blue); font-weight: 600; }

  /* hide hamburger on desktop */
  #menuToggle { display: none !important; }
  .mobile-menu { display: none !important; }

  /* ----- Hero ----- */
  .hero { padding: 24px 20px 28px; }
  .hero h1 { font-size: 2.8rem; max-width: none; margin-left: auto; margin-right: auto; white-space: nowrap; }
  .hero-sub { font-size: 1.25rem; }

  /* ----- Page grid (index) ----- */
  .page-grid {
    display: block;
    padding: 0 20px 48px;
  }

  .page-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
  }

  .page-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: calc(var(--header-h) + 20px);
  }

  /* howto inside grid */
  .page-main .howto {
    margin: 0 auto;
    max-width: 680px;
  }

  /* sponsor inside sidebar — remove its own padding */
  .page-sidebar .sponsor-section {
    padding: 0;
  }
  .page-sidebar .sponsor-section .sponsor-head {
    padding-top: 0;
    border-top: none;
    margin-bottom: 14px;
  }

  /* ----- Account cards on desktop ----- */
  .code-value { font-size: 3rem; }

  /* ----- About page ----- */
  .about-hero { padding: 80px 20px 40px; }
  .about-hero h1 { font-size: 3rem; }

  .section-stack {
    max-width: 1220px;
    padding: 0 20px 48px;
  }

  .features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .about-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }

  /* ----- Footer ----- */
  .site-footer {
    padding: 40px 20px 40px;
  }
  .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
  .footer-brand { margin-bottom: 0; }
  .footer-links { margin-bottom: 0; }
  .footer-copy { margin: 0; }
}

@media (min-width: 1280px) {
  .page-grid { grid-template-columns: 1fr 420px; }
}
