:root {
  --bg: #0f1112;
  --panel: #1b1d20;
  --panel-2: #24272b;
  --border: #2f3237;
  --text: #e9edf0;
  --muted: #9aa3ab;
  --green: #4ade80;
  --green-deep: #1f8a3f;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
}
a { color: var(--green); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.nav { display: flex; align-items: center; gap: 16px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.wordmark { font-weight: 850; letter-spacing: 0.06em; font-size: 20px; color: #fff; }
.wordmark b { color: var(--green); font-weight: inherit; }
.nav-links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: #fff; }

.hero { padding: 56px 0 40px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; margin: 0 0 16px; }
.hero h1 span { color: var(--green); }
.hero p.lead { color: var(--muted); font-size: 19px; margin: 0 0 28px; }
.hero-shot { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.tagline { letter-spacing: 0.35em; text-transform: uppercase; font-size: 12px; color: var(--muted); margin-bottom: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 10px;
  font-weight: 750; text-decoration: none; letter-spacing: 0.03em; border: 1px solid transparent;
}
.btn-primary { background: var(--green); color: #06210f; box-shadow: 0 4px 0 var(--green-deep); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--panel); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.small { font-size: 13px; color: var(--muted); }

section { padding: 40px 0; }
h2 { font-size: 30px; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 28px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.shots img { border-radius: 12px; border: 1px solid var(--border); }

/* Live map showcase on the homepage */
.showcase { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--muted); }
.ticks li b { color: var(--text); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }
.map-frame { margin: 0; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.map-tabs { display: flex; gap: 4px; margin-bottom: 10px; overflow: hidden; }
.map-tabs span { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.map-tabs span.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--green); }
.map-view { position: relative; border-radius: 10px; overflow: hidden; }
.map-view img { width: 100%; height: auto; image-rendering: pixelated; }
.map-chip, .map-link { position: absolute; display: flex; align-items: center; gap: 8px; background: rgba(15, 17, 18, 0.85); border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 600; backdrop-filter: blur(4px); }
.map-chip { top: 12px; left: 12px; padding: 5px 12px; }
.map-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.25); }
.map-link { left: 12px; right: 12px; bottom: 12px; padding: 5px 5px 5px 14px; justify-content: space-between; }
.map-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.map-link b { background: var(--green); color: #06210f; border-radius: 999px; padding: 3px 12px; }
.map-frame figcaption { margin-top: 8px; text-align: center; }

.support { background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), var(--panel)); border: 1px solid rgba(74, 222, 128, 0.3); border-radius: var(--radius); padding: 28px; }

.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin-top: 36px; }
.prose h3 { margin-top: 24px; }
.prose li { margin-bottom: 6px; }
.prose code, .prose kbd { background: var(--panel-2); padding: 2px 6px; border-radius: 6px; font-size: 14px; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; }
td, th { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }

/* AdSense units (filled by assets/ads.js). Boxes stay collapsed until an ad actually loads, so an
   unfilled spot never leaves an empty gap. */
.ad-box { margin: 32px 0; }
.ad-box:empty { display: none; }
.ad-box .ad-label { display: none; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ad-box ins.adsbygoogle { display: block; }
.ad-box:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad-box:has(ins[data-ad-status="filled"]) .ad-label { display: block; }

/* "On your phone?" note: HostCraft is a Windows app, so phones get a share/copy link instead. */
.mobile-note { display: none; }

footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
footer a { color: var(--muted); }
.disclaimer { font-size: 12px; letter-spacing: 0.02em; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .grid, .shots, .showcase { grid-template-columns: 1fr; }
  .nav-links { gap: 12px; }
}

/* Phones */
@media (max-width: 600px) {
  body { font-size: 16px; line-height: 1.55; }
  .nav { flex-wrap: wrap; gap: 10px; padding: 14px 0 6px; }
  .brand img { width: 30px; height: 30px; }
  .wordmark { font-size: 18px; }
  /* Links become one swipeable row of pills under the logo. */
  .nav-links {
    margin: 0 -16px; padding: 4px 16px 8px; gap: 8px;
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    width: calc(100% + 32px);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a {
    flex: none; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px;
    background: var(--panel); color: var(--text); font-size: 14px;
  }

  .hero { gap: 28px; padding: 16px 0 24px; }
  .hero h1 { font-size: 34px; margin-bottom: 12px; }
  .hero p.lead { font-size: 17px; margin-bottom: 22px; }
  .tagline { letter-spacing: 0.18em; font-size: 11px; margin-bottom: 10px; }
  .hero .btn-row .btn { flex: 1 1 100%; justify-content: center; }
  .btn { padding: 14px 20px; }

  .mobile-note {
    display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
    padding: 14px 16px; margin: 18px 0 4px; font-size: 14px; color: var(--muted);
  }
  .mobile-note b { color: var(--text); }
  .mobile-note button {
    margin-top: 10px; width: 100%; padding: 11px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--panel-2); color: var(--text); font: inherit; font-weight: 650; cursor: pointer;
  }

  section { padding: 28px 0; }
  h2 { font-size: 24px; line-height: 1.25; }
  .sub { margin-bottom: 20px; }
  .card { padding: 18px; }
  .support { padding: 20px; }
  .support .btn-row .btn { flex: 1 1 100%; justify-content: center; }

  .prose h1 { font-size: 30px; line-height: 1.2; }
  .prose h2 { font-size: 21px; margin-top: 28px; }
  .prose h3 { font-size: 18px; }
  .prose ul, .prose ol { padding-left: 22px; }
  .prose pre { overflow-x: auto; }
  /* Wide tables scroll sideways inside the page instead of squashing every column. */
  .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 14px; }
  .prose table td, .prose table th { padding: 8px 10px; min-width: 96px; }
  .prose table td:first-child, .prose table th:first-child { min-width: 80px; }
  footer { padding: 22px 0 32px; }
  footer .links { gap: 10px 16px; }
}

/* Feedback form on the contact page */
.fb-form { display: flex; flex-direction: column; gap: 6px; max-width: 560px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 16px 0 8px; }
.fb-form label { font-weight: 600; margin-top: 8px; }
.fb-form input[type=text], .fb-form input[type=email], .fb-form textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.fb-form textarea { resize: vertical; min-height: 120px; }
.fb-kind { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.fb-kind legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.fb-kind label { font-weight: 400; margin: 0; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.fb-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fb-status { min-height: 1.5em; margin: 8px 0 4px; color: var(--muted); }
.fb-status.good { color: var(--green); }
.fb-status.bad { color: #f87171; }
.fb-form .btn { align-self: flex-start; cursor: pointer; font: inherit; font-weight: 750; }
.fb-form .btn:disabled { opacity: 0.6; cursor: default; }
