:root {
  --bg: #0b1220;
  --panel: #0f172a;
  --muted: #93a4bf;
  --text: #e5ecff;
  --border: rgba(148,163,184,0.15);
  --brand: #38bdf8;
  --cta: #22c55e;
}

/* Reset & base */
* { box-sizing: border-box; }

/* 🔧 removed min-width to allow responsive scaling */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.65 Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a { color: var(--brand); text-decoration: none; }
a:hover { opacity: .92; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px;
}

/* 🔧 ensure container has padding on smaller screens */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
}

.row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* Background layers */
.bg { position: fixed; inset: 0; z-index: -1; }
.bg-grad {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(56,189,248,.18), transparent 55%),
    radial-gradient(900px 600px at 120% 10%, rgba(34,197,94,.12), transparent 50%),
    var(--bg);
}
.bg-shapes { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; }
.bg-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 240px; opacity: .6; }

/* Header (non-sticky) */
.site-header {
  position: static;
  top: auto;
  z-index: 50;
  background: linear-gradient(180deg, rgba(11,18,32,.92), rgba(11,18,32,.76));
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(150%) blur(8px);
}
.logo { font-weight: 800; letter-spacing: .3px; color: #fff; }
.logo:hover { opacity: 1; }
.nav a {
  color: #d9e7ff;
  padding: 10px 8px;
  border-radius: 8px;
}
.nav a:hover { background: rgba(148,163,184,.12); }

/* 🔧 Only show nav on larger screens */
.sm-hidden { display: inline-flex; }

@media (max-width: 768px) {
  .sm-hidden {
    display: none; /* 🔧 hide menu on smaller devices */
  }
}

/* Hero */
.hero { padding: 64px 0 32px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}
.h1 {
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.05;
  margin: 8px 0 12px;
  text-align: left;
}
.sub { color: var(--muted); max-width: 760px; }
.ticks { list-style: none; padding: 0; margin: 14px 0 0; color: #cfe0ff; }
.ticks li { margin: .15rem 0; }

/* Buttons */
.cta { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; justify-content: flex-start; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border);
  padding: 12px 16px; border-radius: 10px;
  cursor: pointer; background: transparent; color: var(--text);
  transition: transform .12s ease, box-shadow .12s ease, background-color .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-cta {
  background: linear-gradient(135deg, var(--cta), #39e58a);
  border: none; color: #03260c; font-weight: 700;
}
.btn-ghost { color: #d9e7ff; background: rgba(148,163,184,.1); }

/* Notices */
.notice {
  margin-top: 16px;
  background: rgba(56,189,248,.12);
  border: 1px dashed rgba(56,189,248,.35);
  color: #dff6ff;
  padding: 10px 12px; border-radius: 10px;
}

/* s & grids */
.section { padding: 42px 0; background: transparent; }
.h2 { font-size: clamp(22px, 3.4vw, 32px); margin: 0 0 16px; }
.center { text-align: center; }
.grid { display: grid; gap: 18px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.icons-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.faq-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Cards/panels */
.card,
.icon-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  color: var(--text);
}
.card h3 { margin: 0 0 6px; }
.card:hover {
  border-color: var(--brand);
  background: rgba(56,189,248,.06);
  transition: all .2s ease-in-out;
}
.icon-card { text-align: center; }
.icon-circle {
  width: 52px; height: 52px; border-radius: 999px; margin: 0 auto 8px;
  display: grid; place-items: center;
  background: rgba(148,163,184,.1);
  border: 1px solid var(--border);
  font-size: 24px;
}

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  border-bottom: 1px solid var(--border);
  padding: 12px; text-align: left;
}
.table th {
  color: #cfe0ff;
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 1;
}
.table tr:hover td { background: rgba(56,189,248,.04); }

/* FAQ */
.faq summary { cursor: pointer; font-weight: 600; }
.faq > p { margin: .5rem 0 0; color: var(--text); }

/* Footer */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  margin-top: 34px;
  color: #9fb2d3;
  background: transparent;
}
.footer-3 {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.small { font-size: 13px; color: #9fb2d3; }

/* Dialog / modal */
dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 720px;
  width: min(95vw, 720px);
  background: transparent;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}
dialog::backdrop {
  backdrop-filter: blur(2px);
  background: rgba(3,10,20,.55);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 10px 0;
}
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0c1323;
  color: var(--text);
  padding: 10px;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Testimonials */
.quotes-3 {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 20px;
}
.quote {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  font-style: italic;
  color: var(--muted);
  position: relative;
}
.quote::before {
  content: "“";
  font-size: 36px;
  position: absolute;
  top: 12px;
  left: 16px;
  color: var(--brand);
}
.quote-footer {
  margin-top: 12px;
  font-size: 14px;
  color: #dbe9ff;
  font-style: normal;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--brand), var(--cta));
  color: #03260c;
  text-align: center;
  padding: 40px 20px;
  border-radius: 16px;
  margin: 48px auto 0;
}
.cta-banner h2 {
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: 12px;
  color: #03260c;
}
.cta-banner p {
  max-width: 700px;
  margin: 0 auto 18px;
  font-size: 16px;
  color: #063e18;
}
.cta-banner .btn-cta {
  background: #03260c;
  color: #d1ffeb;
  border: none;
}

/* Motion/contrast/print */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto;
  }
  .btn:hover {
    transform: none;
    box-shadow: none;
  }
  dialog::backdrop {
    backdrop-filter: none;
  }
}
@media (forced-colors: active) {
  * { forced-color-adjust: auto; }
  .btn { border: 1px solid ButtonText; }
  .card, .icon-card, .panel, .modal { border: 1px solid ButtonText; }
}
@media print {
  .bg, .site-header, .hero-art, .cta, .cta-banner { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .container { max-width: 100%; padding: 0; }
}
#hackerNews {
  text-align: center;
  margin: 40px auto;
  max-width: 700px;
}

#hackerNews ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: inline-block;
  text-align: left;
}

#hackerNews li {
  margin: 6px 0;
}

#hackerNews a {
  color: var(--brand);
  font-weight: 500;
  text-decoration: none;
}
#hackerNews a:hover {
  text-decoration: underline;
}
#hnList {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 0 auto;
  list-style: none;
}
#hnList li {
  display: inline-block; /* Make list items inline so they line up horizontally */
  margin: 0 8px;          /* Add some horizontal spacing */
  text-align: center;     /* Center text inside each item */
}
.faq-wrap,
.faq-wrap * {
  color: var(--text) !important;
}
/* Mobile view adjustments */
@media (max-width: 768px) {
  #hackerNews ul {
    display: block;        /* stack links normally */
    text-align: left;      /* left-align the links */
    margin: 0 auto;        /* keep the block centered under the title */
    max-width: 90%;        /* optional: narrower block on small screens */
  }

  #hackerNews li {
    display: block;        /* one link per line */
    margin: 6px 0;
    text-align: left;
  }
}
