:root {
  --bg: #070b14;
  --bg-2: #0a1020;
  --panel: rgba(20, 28, 48, 0.55);
  --panel-solid: #111a2e;
  --border: rgba(86, 110, 160, 0.18);
  --border-strong: rgba(86, 110, 160, 0.32);
  --text: #eaf0fb;
  --muted: #9aa8c2;
  --muted-2: #6b7a99;
  --accent: #22d3ee;
  --accent-2: #3b82f6;
  --accent-3: #8b5cf6;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --danger: #f87171;
  --success: #4ade80;
  --radius: 18px;
  --radius-sm: 11px;
  --maxw: 1140px;
  --shadow: 0 30px 80px -28px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 0 1px var(--border), 0 20px 60px -24px rgba(34, 211, 238, 0.28);
}

* {
  box-sizing: border-box;
}

/* Inherit the page font on form controls (fixes Arial fallback on buttons like .eyebrow, .news-filter, .vchat-close). */
button, input, select, textarea {
  font-family: inherit;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #04121a;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Animated background ---------- */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(900px 600px at 0% 20%, rgba(139, 92, 246, 0.1), transparent 55%),
    var(--bg);
}
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.aurora-1 {
  width: 50vw;
  height: 50vw;
  left: -10vw;
  top: -10vw;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.45), transparent 70%);
  animation: drift1 26s ease-in-out infinite;
}
.aurora-2 {
  width: 46vw;
  height: 46vw;
  right: -12vw;
  top: 8vh;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.4), transparent 70%);
  animation: drift2 32s ease-in-out infinite;
}
.aurora-3 {
  width: 40vw;
  height: 40vw;
  left: 30vw;
  bottom: -18vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.32), transparent 70%);
  animation: drift3 38s ease-in-out infinite;
}
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vw, 6vh) scale(1.12); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1.05); }
  50% { transform: translate(-7vw, 5vh) scale(0.95); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5vw, -6vh) scale(1.1); }
}
.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease,
    border-color 0.25s ease, opacity 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 80px at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.25), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.btn:hover::after {
  opacity: 1;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  box-shadow: 0 12px 36px -12px rgba(34, 211, 238, 0.65);
}
.btn-primary:hover {
  box-shadow: 0 18px 48px -12px rgba(34, 211, 238, 0.9);
  transform: translateY(-2px);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn-block {
  width: 100%;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-condensed {
  background: rgba(7, 11, 20, 0.85);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.8);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  transition: height 0.3s ease;
}
.site-header.is-condensed .header-inner {
  height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text);
}
.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.5));
}
.brand-logo {
  width: auto;
  height: 44px;
  display: block;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.45));
  transition: height 0.3s ease;
}
.site-header.is-condensed .brand-logo {
  height: 38px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav a:hover {
  color: var(--text);
}
.nav-cta {
  padding: 9px 18px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(720px 440px at 50% 0%, #000, transparent 78%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  padding: 130px 24px 130px;
  text-align: center;
  z-index: 1;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 7px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--accent-soft);
  backdrop-filter: blur(6px);
}
.hero-title {
  margin: 0 auto 24px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.025em;
  max-width: 16ch;
  background: linear-gradient(180deg, #ffffff, #b9c6e6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subhead {
  margin: 0 auto 38px;
  max-width: 60ch;
  font-size: clamp(1.04rem, 2vw, 1.22rem);
  color: var(--muted);
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 56px auto 0;
  padding: 0;
  max-width: 720px;
}
.stat {
  flex: 1 1 180px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  backdrop-filter: blur(10px);
}
.stat-num {
  margin: 0;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- Sections ---------- */
.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-title {
  margin: 10px 0 12px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-sub {
  margin: 0 auto;
  max-width: 52ch;
  color: var(--muted);
}

.services {
  position: relative;
  padding: 104px 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 30px;
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
}
/* The card uses preserve-3d for the hover tilt; without lifting the content
   forward in 3D space, the card surface/glow can render ON TOP of its own
   children in some browsers, swallowing clicks on the "Learn more" link.
   Pull the real content forward so it always stays clickable. */
.card > * {
  position: relative;
  transform: translateZ(0.01px);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(140deg, rgba(34, 211, 238, 0.6), rgba(139, 92, 246, 0.35) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}
.card:hover::before {
  opacity: 1;
}
.card-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 22px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 0 20px -10px rgba(34, 211, 238, 0.6);
}
.card-icon svg {
  width: 26px;
  height: 26px;
}
.card-title {
  margin: 0 0 12px;
  font-size: 1.24rem;
  font-weight: 700;
}
.card-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.card-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  transform: translateZ(1px);
}
.card-link::after {
  content: "→";
  transition: transform 0.2s ease;
}
.card:hover .card-link::after {
  transform: translateX(4px);
}

/* ---------- Server-rendered content pages (/about, /services/<slug>) ---------- */
.page-hero {
  padding: 130px 0 40px;
}
.page-title {
  margin: 0 0 18px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  font-weight: 700;
}
.page-intro {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 1.12rem;
}
.page-section {
  padding: 20px 0 110px;
}
.page-prose {
  max-width: 760px;
}
.page-prose .page-intro {
  margin-bottom: 22px;
  color: var(--text);
}
.page-lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.02rem;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}
.detail-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.detail-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  backdrop-filter: blur(12px);
}
.detail-card-title {
  margin: 0 0 12px;
  font-size: 1.18rem;
  font-weight: 700;
}
.detail-card-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}
@media (max-width: 860px) {
  .detail-cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  padding: 104px 0 120px;
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-copy {
  position: sticky;
  top: 110px;
}
.contact-copy .section-title {
  text-align: left;
}
.contact-lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 44ch;
}
.contact-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.req {
  color: var(--accent);
}
.optional {
  color: var(--muted);
  font-weight: 400;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: rgba(5, 9, 18, 0.6);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #5d6b86;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(5, 9, 18, 0.85);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid transparent;
}
.field.invalid input,
.field.invalid textarea {
  border-color: var(--danger);
}
.field-error {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--danger);
  min-height: 1em;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  margin: 16px 0 0;
  font-size: 0.95rem;
  min-height: 1.2em;
  text-align: center;
}
.form-status.is-success {
  color: var(--success);
}
.form-status.is-error {
  color: var(--danger);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.6);
  padding: 44px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
}
.footer-logo {
  width: auto;
  max-width: 260px;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.35));
}
.footer-tag {
  margin: 4px 0 0;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer-location {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--reveal-delay, 0) * 90ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
/* Four service cards: 4-up on wide screens, 2-up on mid widths, 1-up on phones. */
@media (max-width: 1100px) and (min-width: 901px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-inline: auto;
  }
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .contact-copy {
    position: static;
  }
  .contact-copy .section-title {
    text-align: center;
  }
  .contact-lead {
    max-width: none;
  }
}

@media (max-width: 620px) {
  .nav {
    gap: 16px;
  }
  .nav a:not(.nav-cta) {
    display: none;
  }
  .brand-logo {
    height: 36px;
  }
  .footer-logo {
    max-width: 220px;
  }
  .hero-inner {
    padding: 92px 20px 96px;
  }
  .hero-stats {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .hero-canvas {
    display: none;
  }
}

/* ---------- Contact confirmation modal ---------- */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 7, 14, 0.72);
  backdrop-filter: blur(8px);
  animation: confirm-fade 0.18s ease;
}
.confirm-overlay[hidden] {
  display: none;
}
@keyframes confirm-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.confirm-card {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.7);
  padding: 28px;
  animation: confirm-rise 0.2s ease;
}
@keyframes confirm-rise {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.confirm-card h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}
.confirm-sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}
.confirm-review {
  margin: 0 0 22px;
  display: grid;
  gap: 12px;
}
.confirm-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: start;
}
.confirm-row dt {
  color: var(--muted-2);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 2px;
}
.confirm-row dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}
.confirm-message {
  white-space: pre-wrap;
  max-height: 180px;
  overflow-y: auto;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.5;
}
.confirm-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.confirm-actions .btn {
  flex: 1 1 auto;
  min-width: 140px;
  justify-content: center;
}
@media (max-width: 480px) {
  .confirm-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* ---------- AI concierge widget ---------- */
.vchat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 400;
  font-family: inherit;
}
.vchat-launcher {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #04121a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 40px -12px rgba(34, 211, 238, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vchat-launcher:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 22px 52px -12px rgba(34, 211, 238, 0.9);
}
.vchat.is-open .vchat-launcher {
  transform: scale(0.92);
  opacity: 0.85;
}
.vchat-panel[hidden] {
  display: none !important;
}
.vchat-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: vchat-rise 0.22s ease;
}
@keyframes vchat-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.vchat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(59, 130, 246, 0.14));
  border-bottom: 1px solid var(--border);
}
.vchat-title { display: flex; flex-direction: column; line-height: 1.2; }
.vchat-title strong { color: var(--text); font-size: 0.98rem; }
.vchat-title span { color: var(--muted); font-size: 0.74rem; }
.vchat-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.vchat-close:hover { color: var(--text); }
.vchat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vchat-msg { display: flex; }
.vchat-user { justify-content: flex-end; }
.vchat-assistant { justify-content: flex-start; }
.vchat-bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.vchat-user .vchat-bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  border-bottom-right-radius: 4px;
}
.vchat-assistant .vchat-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.vchat-typing { display: flex; gap: 4px; align-items: center; }
.vchat-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
  animation: vchat-blink 1.2s infinite ease-in-out both;
}
.vchat-typing span:nth-child(2) { animation-delay: 0.2s; }
.vchat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes vchat-blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}
.vchat-lead[hidden] {
  display: none !important;
}
.vchat-lead {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: rgba(34, 211, 238, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vchat-lead-title { margin: 0; font-size: 0.82rem; color: var(--muted); }
.vchat-input-sm {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(7, 11, 20, 0.6);
  color: var(--text);
  font-size: 0.85rem;
}
.vchat-input-sm:focus { outline: none; border-color: var(--accent); }
.vchat-lead-actions { display: flex; gap: 8px; }
.vchat-btn-sm {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
}
.vchat-btn-sm:hover { border-color: var(--accent); color: var(--accent); }
.vchat-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  border: none;
  font-weight: 600;
}
.vchat-btn-primary:hover { color: #04121a; filter: brightness(1.05); }
.vchat-compose {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  align-items: flex-end;
}
.vchat-input {
  flex: 1;
  resize: none;
  max-height: 120px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(7, 11, 20, 0.6);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
}
.vchat-input:focus { outline: none; border-color: var(--accent); }
.vchat-send {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #04121a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.vchat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.vchat-foot {
  margin: 0;
  padding: 0 12px 10px;
  font-size: 0.68rem;
  color: var(--muted-2);
  text-align: center;
}
@media (max-width: 480px) {
  .vchat { right: 14px; bottom: 14px; }
  .vchat-panel { bottom: 70px; height: min(70vh, calc(100vh - 100px)); }
}

/* ------------------------------------------------------------------ */
/* Legal pages (prose) */
/* ------------------------------------------------------------------ */
.legal {
  max-width: 760px;
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
}
.legal-updated {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.legal h2 {
  margin: 32px 0 10px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.25rem;
  color: var(--text);
}
.legal p {
  margin: 0 0 14px;
  color: var(--muted);
}
.legal ul {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--muted);
}
.legal li {
  margin: 0 0 8px;
}
.legal a {
  color: var(--accent);
  text-decoration: none;
}
.legal a:hover {
  text-decoration: underline;
}
.legal strong {
  color: var(--text);
}
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ------------------------------------------------------------------ */
/* Footer legal links + business identity */
/* ------------------------------------------------------------------ */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 14px 0 0;
}
.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}
.footer-legal a:hover {
  color: var(--accent);
}
.footer-identity {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 0.82rem;
}
.footer-identity a {
  color: var(--muted);
  text-decoration: none;
}
.footer-identity a:hover {
  color: var(--accent);
}
.footer-affiliation {
  max-width: 70ch;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted-2);
}

/* Cloudflare Turnstile host: reserve space so the ~65px widget has room to render
   (prevents the container collapsing to 0 height before the iframe attaches). */
.turnstile-host {
  min-height: 65px;
  margin: 4px 0 4px;
}

/* ------------------------------------------------------------------ */
/* Contact form privacy notice */
/* ------------------------------------------------------------------ */
.form-privacy {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.form-privacy a {
  color: var(--accent);
  text-decoration: none;
}
.form-privacy a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Cookie consent banner */
/* ------------------------------------------------------------------ */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  padding: 16px;
  background: rgba(10, 16, 32, 0.96);
  border-top: 1px solid var(--border-strong);
  backdrop-filter: blur(10px);
  box-shadow: 0 -20px 50px -28px rgba(0, 0, 0, 0.8);
}
.cookie-banner[hidden] {
  display: none;
}
.cookie-banner-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.cookie-banner-text {
  margin: 0;
  flex: 1 1 360px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.cookie-banner-text a {
  color: var(--accent);
  text-decoration: none;
}
.cookie-banner-text a:hover {
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-banner .btn-sm {
  padding: 9px 18px;
  font-size: 0.88rem;
}
@media (max-width: 560px) {
  /* Respect the home-indicator safe area so buttons never hide behind it. */
  .cookie-banner {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  /* Full-width buttons that split the row evenly, so neither sits under the
     floating concierge launcher (which is lifted above the banner below). */
  .cookie-banner-actions {
    width: 100%;
    justify-content: stretch;
  }
  .cookie-banner .btn-sm {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* While the cookie banner is visible, lift the concierge launcher above it so
   the two never collide on small screens. The :has() rule is order-independent;
   the sibling rule is a fallback for browsers without :has() support. */
.cookie-banner:not([hidden]) ~ .vchat,
body:has(.cookie-banner:not([hidden])) .vchat {
  bottom: 104px;
}

/* ---------- Cyber Security News (/news) ---------- */
.news-updated {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--muted-2);
}
/* Severity filter buttons (pill toggles above the board). */
.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}
.news-filter {
  appearance: none;
  cursor: pointer;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.news-filter:hover {
  color: var(--text);
  border-color: var(--accent);
}
.news-filter.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.news-wrap {
  max-width: 1360px;
}
/* Column board: one column per category, items stacked within, columns side by side. */
.news-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}
.news-group[hidden] {
  display: none;
}
.news-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px 16px 20px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.news-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}
.news-group-count {
  flex: 0 0 auto;
  min-width: 22px;
  padding: 1px 8px;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}
.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.news-item {
  position: relative;
  padding: 14px 15px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.news-item:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.news-pill {
  display: inline-block;
  margin-bottom: 9px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.news-pill-critical {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.45);
}
.news-pill-high {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
}
.news-pill-notable {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--border-strong);
}
.news-headline {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}
.news-headline a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}
.news-headline a:hover {
  color: var(--accent);
}
.news-meta {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted-2);
}
.news-why {
  margin: 9px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}
.news-empty {
  margin: 0;
  padding: 40px 22px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}
/* Responsive column counts: 5 → 3 → 2 → 1 as the viewport narrows. */
@media (max-width: 1180px) {
  .news-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .news-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 540px) {
  .news-board {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .news-item {
    padding: 16px 16px;
  }
}

/* ---------------------------------------------------------------------------
   Geek Zone — listing grid, tool cards, and built-in tool UI.
   Mirrors the page-section / card aesthetics used elsewhere on the site.
--------------------------------------------------------------------------- */
.geek-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.geek-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.geek-card:hover,
.geek-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.geek-card-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.geek-card-title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}
.geek-card-ext {
  font-size: 0.8em;
  color: var(--accent);
}
.geek-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.geek-back {
  color: var(--accent);
  text-decoration: none;
}
.geek-back:hover {
  text-decoration: underline;
}

/* Built-in tool UI (rendered into #geek-tool by public/geek/<slug>.js). */
.geek-tool .tool {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  max-width: 720px;
}
.tool-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tool-field label,
.tool-fieldset legend {
  font-weight: 600;
  color: var(--text);
}
.tool-field input[type="text"],
.tool-field input[type="password"],
.tool-field textarea,
.tool-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
}
.tool-field textarea {
  resize: vertical;
}
.tool-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.tool-row input {
  flex: 1;
}
.tool-output {
  flex: 1;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
  display: flex;
  align-items: center;
}
.tool-output-hash {
  font-size: 0.9rem;
}
.tool-fieldset {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 0;
}
.tool-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  color: var(--muted);
}
.tool-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.tool-meta {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.85rem;
  line-height: 1.5;
}
.tool-privacy {
  border-left: 2px solid var(--accent);
  padding-left: 12px;
  color: var(--muted);
}
.tool-status {
  margin: 0;
  min-height: 1.2em;
  color: var(--accent);
  font-size: 0.9rem;
}
.tool-copy {
  white-space: nowrap;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* Breach checker strength meter. */
.tool-strength {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tool-strength-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.tool-strength-bar span {
  display: block;
  height: 100%;
  width: 0;
  transition: width 0.2s ease, background 0.2s ease;
  background: var(--muted-2);
}
.tool-strength-bar .bc-level-0 { background: var(--danger); }
.tool-strength-bar .bc-level-1 { background: #f59e0b; }
.tool-strength-bar .bc-level-2 { background: #eab308; }
.tool-strength-bar .bc-level-3 { background: #84cc16; }
.tool-strength-bar .bc-level-4 { background: var(--success); }

/* Geek Zone — additional tool UI for the 7 added tools (JWT, UUID, timestamp,
   CIDR, DNS, headers, TLS). Reuses existing .tool-* classes; adds key/value
   lists, preformatted output, a results table, and status badges. */
.tool-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  min-height: 44px;
  align-items: flex-start;
  display: block;
  padding: 12px 14px;
  margin: 0;
}
.tool-kv {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.tool-kv-row {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-2);
}
.tool-kv-row dt {
  flex: 0 0 42%;
  color: var(--muted);
  font-weight: 600;
}
.tool-kv-row dd {
  margin: 0;
  flex: 1;
  color: var(--text);
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
}

/* Results table (DNS, headers) — public-side equivalent of the admin table. */
.geek-tool .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.geek-tool table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.geek-tool th,
.geek-tool td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.geek-tool th {
  color: var(--muted);
  font-weight: 600;
  background: var(--bg-2);
}
.geek-tool tr:last-child td {
  border-bottom: none;
}
.geek-tool .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.geek-tool .truncate {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Status badge (present/missing, used by the security-headers tool). */
.geek-tool .badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.geek-tool .badge.enabled {
  background: rgba(74, 222, 128, 0.14);
  color: var(--success);
}
.geek-tool .badge.disabled {
  background: rgba(248, 113, 113, 0.14);
  color: var(--danger);
}

/* TLS expiry color coding. */
.tls-ok { color: var(--success); font-weight: 600; }
.tls-warn { color: #f59e0b; font-weight: 600; }
.tls-bad { color: var(--danger); font-weight: 600; }

/* ---- Site-wide header search ---- */
.site-search {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.search-toggle:hover,
.site-search.is-open .search-toggle {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  width: min(380px, calc(100vw - 32px));
  padding: 14px;
  background: rgba(12, 18, 33, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(2, 6, 18, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(7, 11, 20, 0.6);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-input::placeholder { color: var(--muted-2); }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-pills {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
}
.search-pills .news-filter { padding: 5px 14px; font-size: 0.8rem; }
.search-results {
  max-height: 360px;
  margin-top: 8px;
  overflow-y: auto;
}
.search-status {
  margin: 8px 4px;
  font-size: 0.85rem;
  color: var(--muted-2);
}
.search-group + .search-group { margin-top: 6px; }
.search-group-head {
  padding: 8px 6px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  text-decoration: none;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.search-result:hover,
.search-result.is-active {
  background: var(--accent-soft);
}
.search-result-icon {
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1;
}
.search-result-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.search-result-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-sub {
  font-size: 0.76rem;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-ext {
  margin-left: auto;
  color: var(--accent);
  font-size: 0.9rem;
}
@media (max-width: 640px) {
  .search-panel {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    width: auto;
  }
}

/* ---- QR Code Generator tool ---- */
.qr-tool { display: flex; flex-direction: column; gap: 16px; }
.qr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.qr-tab { padding: 6px 14px; font-size: 0.82rem; }
.qr-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.qr-field { display: flex; flex-direction: column; gap: 6px; }
.qr-field label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.qr-field input[type="text"],
.qr-field select,
.qr-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(7, 11, 20, 0.6);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.qr-field textarea { resize: vertical; font-family: inherit; }
.qr-field input[type="text"]:focus,
.qr-field select:focus,
.qr-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.qr-field-check { flex-direction: row; align-items: center; gap: 10px; }
.qr-field-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.qr-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.qr-options .tool-field { display: flex; flex-direction: column; gap: 6px; }
.qr-options label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.qr-options input[type="range"] { width: 100%; accent-color: var(--accent); }
.qr-options select {
  padding: 9px 12px;
  color: var(--text);
  background: rgba(7, 11, 20, 0.6);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.qr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.qr-canvas-card {
  display: inline-flex;
  padding: 16px;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(2, 6, 18, 0.5);
}
.qr-canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  image-rendering: pixelated;
}
.qr-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.qr-encoded label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }

/* ---- Header search: keep visible + responsive on mobile ---- */
@media (max-width: 768px) {
  /* The nav hides text links on small screens; keep the search control shown.
     .site-search is a <div> (not .nav a) so it isn't caught by the link-hiding
     rule, but make visibility explicit and resilient to future nav changes. */
  .site-search,
  .nav .site-search {
    display: inline-flex !important;
  }
  .search-toggle {
    display: inline-flex !important;
  }
  /* Drop the dropdown below the header, anchored to the right edge so it can't
     clip off-screen, and size it to fit narrow viewports without overflow. */
  .search-panel {
    position: fixed;
    top: 68px;
    right: 12px;
    left: auto;
    width: min(360px, calc(100vw - 24px));
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }
}

/* Geek Zone agreement gate (Security Tools Notice). */
.geek-agree-form { margin-top: 28px; }
.geek-agree-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
