/* ============================================
   NQ Hub — Clean Authority Design System
   Domain: nqsourcing.com
   Version: 2.0
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: #0D7377 #1A1815;
  scrollbar-width: thin;
}

/* Webkit scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1A1815;
}

::-webkit-scrollbar-thumb {
  background: #0D7377;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0FBFC4;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #F4F0EB;
  background-image:
    radial-gradient(circle, #D0C9BF 0.5px, transparent 0.5px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 22px 22px, auto;
  color: #1A1815;
  line-height: 1.7;
  max-width: 100%;
  overflow-x: hidden;
}

::selection {
  background: #0D7377;
  color: #FFF;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  color: #12100E;
  line-height: 1.25;
}

h1 {
  font-family: Georgia, Charter, "Bitstream Charter", "Noto Serif", serif;
  font-size: 2.3rem;
  margin-bottom: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Hub page h1 — editorial accent bar */
.content > h1:first-child {
  font-size: 2.4rem;
  padding-bottom: 0.6rem;
  margin-bottom: 0.5rem;
  position: relative;
}

.content > h1:first-child::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: #0D7377;
  margin-top: 0.5rem;
  border-radius: 2px;
}

h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.05rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid #0D7377;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0D7377;
}

h3 {
  font-family: Georgia, Charter, "Bitstream Charter", "Noto Serif", serif;
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
  font-style: italic;
  color: #2A2520;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1.1rem;
  max-width: 72ch;
}

/* Lead paragraph — first <p> after h1 */
.content > section:first-child > p:first-of-type,
.hero .container > p:first-of-type {
  font-size: 1.08rem;
  color: #3A352F;
  line-height: 1.75;
}

a {
  color: #0D7377;
  text-decoration: underline;
  text-decoration-color: rgba(13,115,119,0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s ease;
}

a:hover {
  text-decoration-color: #0D7377;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

strong {
  font-weight: 700;
  color: #12100E;
}

code {
  font-family: "SF Mono", "Cascadia Code", "Fira Code", Consolas, monospace;
  background: #E8EEED;
  padding: 0.15em 0.45em;
  border-radius: 2px;
  border: 1px solid #D5DCDA;
  font-size: 0.86em;
  word-break: break-all;
  color: #0D7377;
}

/* --- Layout --- */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header / Nav --- */
.site-header {
  background: #111;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-top: 3px solid #0FBFC4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 820px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 32px;
  width: auto;
}

.site-logo:hover {
  opacity: 0.85;
  text-decoration: none;
}

/* Hero logo (index page) */
.hero-logo {
  float: right;
  width: 200px;
  height: auto;
  margin: 0 0 1rem 1.5rem;
}

/* Footer logo */
.footer-logo-img {
  display: block;
  width: 100px;
  height: auto;
  margin-bottom: 0.3rem;
}

.nav-links {
  display: flex;
  gap: 1.3rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.nav-links a {
  color: #777;
  font-size: 0.78rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover {
  color: #CCC;
  border-bottom-color: #444;
}

.nav-links a.active {
  color: #FAFAFA;
  border-bottom-color: #0FBFC4;
}

/* --- Hero / Verification Table --- */
.hero {
  background: #111;
  color: #E0E0E0;
  padding: 2.2rem 0 2.5rem;
  margin-bottom: 0;
  box-shadow: inset 0 -1px 0 #222;
}

.hero h1 {
  color: #FAFAFA;
  margin-bottom: 0.5rem;
  font-size: 1.9rem;
}

.hero p {
  color: #A0A0A0;
  max-width: 72ch;
}

.hero strong {
  color: #0FBFC4;
}

.hero a {
  color: #0FBFC4;
  text-decoration-color: rgba(15,191,196,0.3);
}

.hero a:hover {
  text-decoration-color: #0FBFC4;
}

.verification-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.86rem;
}

.verification-table caption {
  text-align: left;
  font-size: 0.72rem;
  color: #777;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
}

.verification-table th {
  background: #1A1A1A;
  color: #999;
  text-align: left;
  padding: 0.55rem 0.8rem;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid #0D7377;
}

.verification-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #222;
  color: #D0D0D0;
}

.verification-table tbody tr:hover {
  background: rgba(13,115,119,0.08);
}

.verification-table code {
  background: transparent;
  color: #0FBFC4;
  font-size: 0.82rem;
  padding: 0;
  border: none;
}

.status-active {
  color: #4ADE80;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pgp-valid {
  color: #4ADE80;
}

/* --- Market Cards (Hub Page) --- */
.market-card {
  border-left: 4px solid #0D7377;
  background: #FFFDF9;
  padding: 1.6rem 1.6rem 1.6rem 1.8rem;
  margin-bottom: 1.6rem;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.03);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.market-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.04);
  transform: translateY(-1px);
}

.market-card:nth-child(2) { border-left-color: #2D6A4F; }
.market-card:nth-child(4) { border-left-color: #7C3AED; }
.market-card:nth-child(5) { border-left-color: #B45309; }
.market-card:nth-child(6) { border-left-color: #DC2626; }

.market-card h2 {
  font-family: Georgia, Charter, "Bitstream Charter", "Noto Serif", serif;
  text-transform: none;
  letter-spacing: -0.01em;
  color: #12100E;
  border-bottom: none;
  margin-top: 0;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.35rem;
}

.market-card h2 img {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
}

.market-card p:last-of-type {
  margin-bottom: 0;
  margin-top: 1rem;
}

.card-cta {
  display: inline-block;
  background: #0D7377;
  color: #FFF;
  padding: 0.5rem 1.2rem;
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background 0.15s ease, transform 0.15s ease;
}

.market-card .card-cta {
  color: #FFF;
  text-decoration: none;
}

.card-cta:hover {
  background: #0A5C5F;
  transform: translateY(-1px);
}

/* --- Content Area --- */
.content {
  padding: 2rem 0 3rem;
}

.content section {
  margin-bottom: 2rem;
}

.content section + section {
  margin-top: 3rem;
  padding-top: 1rem;
}

/* --- Content Images (varied layouts) --- */

/* Full-width screenshot — used for tool screenshots */
.img-screenshot {
  display: block;
  max-width: 100%;
  margin: 1.5rem 0;
  border-radius: 3px;
  border: 1px solid #D5DCDA;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Right-float editorial — wraps text on left */
.img-float-right {
  float: right;
  max-width: 44%;
  margin: 0.3rem 0 1.2rem 1.8rem;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

/* Left-float pull — wraps text on right */
.img-float-left {
  float: left;
  max-width: 36%;
  margin: 0.3rem 1.8rem 1.2rem 0;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

/* Centered infographic — narrower than full-width */
.img-centered {
  display: block;
  max-width: 520px;
  margin: 1.5rem auto;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

/* Badge / logo — small inline, floated right */
.img-badge {
  float: right;
  width: 110px;
  margin: 0 0 0.8rem 1.2rem;
  border-radius: 4px;
}

/* Screenshot size variants */
.img-screenshot-sm { max-width: 520px; }
.img-screenshot-md { max-width: 680px; }

/* Clear floats after image sections */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

@media (max-width: 600px) {
  .img-float-right,
  .img-float-left {
    float: none;
    max-width: 100%;
    margin: 1rem 0;
  }
  .img-badge {
    float: none;
    display: block;
    margin: 1rem auto;
  }
  .img-centered {
    max-width: 100%;
  }
}

/* --- FAQ Section --- */
.faq h3 {
  margin-top: 1.6rem;
  color: #0D7377;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 600;
  padding-left: 0.8rem;
  border-left: 3px solid #0D7377;
}

.faq p {
  color: #3A352F;
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 0.75rem;
  color: #777;
  padding: 0.8rem 0 0;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.02em;
}

.breadcrumb a {
  color: #777;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #0FBFC4;
}

.breadcrumb span {
  margin: 0 0.5rem;
  color: #555;
}

/* --- Footer --- */
.site-footer {
  background: #0C0C0C;
  color: #888;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  margin-top: 3rem;
  border-top: 3px solid #0D7377;
}

.footer-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.5rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #1C1C1C;
}

.footer-brand-block {
  flex-shrink: 0;
}

.footer-brand-block .footer-logo {
  font-family: Georgia, Charter, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #E0E0E0;
  display: block;
  margin-bottom: 0.35rem;
}

.footer-brand-block .footer-logo span {
  color: #0FBFC4;
}

.footer-tagline {
  font-size: 0.7rem;
  color: #4A4A4A;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
}

.footer-nav {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-nav a {
  color: #666;
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: #DDD;
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.2rem;
  padding-bottom: 0.5rem;
}

.footer-copy {
  color: #3A3A3A;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.footer-pgp-note {
  font-size: 0.68rem;
  color: #4A4A4A;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
}

.footer-pgp-note strong {
  color: #4ADE80;
  font-weight: 600;
}

.footer-disclaimer {
  border-top: 1px solid #1C1C1C;
  padding-top: 1rem;
  margin-top: 0.5rem;
  color: #3A3A3A;
  font-size: 0.7rem;
  line-height: 1.65;
}

/* --- Pros & Cons Block --- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 1.2rem 0 2rem;
}

.pros-cons .pros,
.pros-cons .cons {
  background: #FFFDF9;
  padding: 1.2rem 1.4rem;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.pros-cons .pros {
  border-left: 4px solid #4ADE80;
}

.pros-cons .cons {
  border-left: 4px solid #F87171;
}

.pros-cons h3 {
  margin-top: 0;
  font-size: 0.95rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pros-cons .pros h3 {
  color: #16A34A;
}

.pros-cons .cons h3 {
  color: #DC2626;
}

.pros-cons ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.pros-cons li {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

@media (max-width: 600px) {
  .pros-cons {
    grid-template-columns: 1fr;
  }
}

/* --- Comparison Table (Hub Page) --- */
.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  min-width: 640px;
}

.comparison-table caption {
  text-align: left;
  font-size: 0.72rem;
  color: #7A7468;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
}

.comparison-table th {
  background: #1A1815;
  color: #A09888;
  text-align: left;
  padding: 0.6rem 0.7rem;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid #0D7377;
}

.comparison-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #E0DAD2;
  color: #2A2520;
}

.comparison-table tbody tr:nth-child(even) {
  background: #F0EBE5;
}

.comparison-table tbody tr:hover {
  background: #E5EFEE;
}

.comparison-table td:first-child {
  font-weight: 700;
}

.comparison-table a {
  font-weight: 600;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: #0D7377;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, background 0.15s ease;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #0FBFC4;
}

/* Arrow via CSS */
.back-to-top::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2.5px solid #FFF;
  border-left: 2.5px solid #FFF;
  transform: rotate(45deg) translateY(2px);
}

/* --- Update Log (Homepage) --- */
.update-log {
  background: #FFFDF9;
  border-left: 3px solid #0D7377;
  border-radius: 0 3px 3px 0;
  padding: 1rem 1.4rem;
  margin: 1.8rem 0 2.2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.update-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #E8E3DC;
}

.update-log-header h2 {
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0D7377;
  margin: 0;
  padding: 0;
  border: none;
}

.log-pulse {
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.62rem;
  color: #4ADE80;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.update-log ul { list-style: none; padding: 0; margin: 0; }

.update-log li {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  padding: 0.28rem 0;
  font-size: 0.82rem;
  color: #3A352F;
  line-height: 1.5;
  margin: 0;
}

.update-log li + li { border-top: 1px solid #F0EBE5; }

.log-date {
  flex-shrink: 0;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.72rem;
  color: #7A7468;
  min-width: 4.2rem;
}

.log-badge {
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.08rem 0.35rem;
  border-radius: 2px;
  font-weight: 600;
  margin-left: 0.25rem;
  vertical-align: 1px;
}

.badge-verified { background: rgba(74,222,128,0.12); color: #16A34A; }
.badge-updated  { background: rgba(13,115,119,0.1);  color: #0D7377; }


/* --- CSS Containment — skip rendering off-screen sections --- */
.content section:nth-child(n+3) {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

.faq {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 0.95rem; }

  .nav-inner {
    flex-direction: column;
    gap: 0.6rem;
  }

  .nav-links {
    gap: 0.8rem;
    justify-content: center;
  }

  .verification-table {
    font-size: 0.78rem;
  }

  .verification-table th,
  .verification-table td {
    padding: 0.4rem 0.5rem;
  }

  .market-card {
    padding: 1.2rem;
  }

  .container {
    padding: 0 1rem;
  }

  .footer-top {
    flex-direction: column;
    gap: 1.2rem;
  }

  .footer-nav {
    justify-content: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
