/* arqgen.css — Design system */
:root {
  --bg:       #0d1117;
  --surface:  #161b22;
  --border:   #30363d;
  --accent:   #2E75B6;
  --accent2:  #58a6ff;
  --success:  #3fb950;
  --warn:     #d29922;
  --danger:   #f85149;
  --text:     #e6edf3;
  --muted:    #8b949e;
  --radius:   8px;
  --font:     "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
}

/* ---- NAV ---- */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent2);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-brand span { color: var(--muted); font-weight: 400; }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  padding: .25rem .5rem;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
nav a:hover, nav a.active { color: var(--text); background: var(--border); }

/* ---- LAYOUT ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
}
.hero h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: .75rem; }
.hero h1 em { color: var(--accent2); font-style: normal; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; }

.badge {
  display: inline-block;
  background: #1a2f4a;
  color: var(--accent2);
  font-size: .75rem;
  padding: .2rem .6rem;
  border-radius: 20px;
  border: 1px solid var(--accent);
  margin-bottom: 1rem;
}

/* ---- CARDS ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .2s, transform .2s;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.card:hover { border-color: var(--accent2); transform: translateY(-2px); }
.card-icon { font-size: 2rem; margin-bottom: .75rem; }
.card h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .875rem; line-height: 1.5; }
.card .tags { margin-top: .75rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.tag {
  font-size: .7rem;
  background: #1a2a1a;
  color: var(--success);
  padding: .15rem .45rem;
  border-radius: 4px;
  border: 1px solid #2a4a2a;
}

/* ---- TOOL PAGE ---- */
.tool-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .tool-layout { grid-template-columns: 1fr; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.panel h2 { font-size: 1.1rem; margin-bottom: 1.25rem; color: var(--accent2); border-bottom: 1px solid var(--border); padding-bottom: .6rem; }

/* ---- FORM ---- */
.form-group { margin-bottom: 1rem; }
label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .3rem; }
input, select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: .45rem .7rem;
  font-size: .9rem;
  font-family: var(--font);
  transition: border-color .15s;
}
input:focus, select:focus { outline: none; border-color: var(--accent2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.1rem;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: .88; }
.btn-success { background: #1a4a1a; color: var(--success); border: 1px solid #2a6a2a; }
.btn-success:hover { background: #1f5a1f; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }

/* ---- PREVIEW PANE ---- */
.preview-pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.preview-tabs { display: flex; border-bottom: 1px solid var(--border); }
.tab-btn {
  padding: .6rem 1.1rem;
  font-size: .85rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--muted);
  transition: color .15s, background .15s;
  border-bottom: 2px solid transparent;
}
.tab-btn.active { color: var(--accent2); border-bottom-color: var(--accent2); }
.tab-content { padding: 1rem; display: none; }
.tab-content.active { display: block; }

#svg-container svg { width: 100%; height: auto; border-radius: 4px; }

/* ---- TABLE ---- */
.catalog-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.catalog-table th {
  background: #1a2f4a;
  color: var(--accent2);
  padding: .45rem .6rem;
  text-align: left;
  font-weight: 600;
}
.catalog-table td { padding: .4rem .6rem; border-bottom: 1px solid var(--border); }
.catalog-table tr:nth-child(even) td { background: #11161c; }

/* ---- NTC ALERTS ---- */
.ntc-ok    { color: var(--success); font-size: .85rem; }
.ntc-warn  { color: var(--warn);    font-size: .85rem; }
.ntc-error { color: var(--danger);  font-size: .85rem; }

/* ══════════════════════════════════════════════════════════
   MONETIZATION STYLES
   ══════════════════════════════════════════════════════════ */

/* ---- NAV HIGHLIGHT ---- */
.nav-highlight {
  color: var(--accent2) !important;
  font-weight: 600;
}
.nav-highlight:hover { background: rgba(88,166,255,.12) !important; }

/* ---- HERO CTA BUTTONS ---- */
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.btn-featured {
  background: var(--accent2);
  color: #0d1117;
  font-weight: 700;
  padding: .7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  transition: opacity .15s, transform .1s;
  display: inline-flex; align-items: center; gap: .5rem;
}
.btn-featured:hover { opacity: .88; transform: translateY(-1px); }
.btn-featured-outline {
  border: 2px solid var(--accent2);
  color: var(--accent2);
  font-weight: 600;
  padding: .7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1rem;
  background: transparent;
  transition: background .15s, transform .1s;
  display: inline-flex; align-items: center; gap: .5rem;
}
.btn-featured-outline:hover { background: rgba(88,166,255,.1); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  padding: .55rem 1.1rem;
  border-radius: 6px;
  font-size: .875rem;
  cursor: pointer;
  transition: border-color .15s;
}

/* ---- SECTION LABELS ---- */
.section-label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.section-title { font-size: 1.1rem; font-weight: 600; }
.section-sub { color: var(--muted); font-size: .85rem; margin-top: .35rem; }
.section-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 20px;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.section-badge.free {
  background: #1a3a1a;
  color: var(--success);
  border: 1px solid #2a5a2a;
}
.section-badge.pro {
  background: #1a2a3a;
  color: var(--warn);
  border: 1px solid #2a3a5a;
}

/* ---- FEATURED CARDS (2-column) ---- */
.cards-featured {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}
.card-star {
  border-color: rgba(88,166,255,.4);
  position: relative;
  overflow: hidden;
}
.card-star:hover { border-color: var(--accent2); }
.card-star::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(88,166,255,.06) 0%, transparent 70%);
  pointer-events: none;
}
.card-star-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .7rem;
  font-weight: 700;
  background: rgba(88,166,255,.15);
  color: var(--accent2);
  border: 1px solid rgba(88,166,255,.3);
  padding: .15rem .5rem;
  border-radius: 20px;
  margin-bottom: .75rem;
  letter-spacing: .03em;
}
.card-star-badge.new { background: rgba(63,185,80,.12); color: var(--success); border-color: rgba(63,185,80,.25); }

.card-features {
  list-style: none;
  margin: .75rem 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.7;
}
.card-features li { padding-left: .1rem; }

.card-example {
  margin: .75rem 0;
  padding: .6rem .8rem;
  background: rgba(88,166,255,.07);
  border-left: 2px solid var(--accent2);
  border-radius: 0 4px 4px 0;
  font-size: .8rem;
  color: var(--muted);
}
.example-label { color: var(--accent2); font-weight: 600; margin-right: .4rem; }

.tag-free {
  background: #1a3a1a !important;
  color: var(--success) !important;
  border-color: #2a5a2a !important;
  font-weight: 700;
}

/* ---- COMING SOON CARDS ---- */
.card-coming-soon {
  position: relative;
  pointer-events: none;
  opacity: .75;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--text);
  overflow: hidden;
}
.coming-soon-ribbon {
  position: absolute;
  top: 14px; right: -22px;
  background: var(--warn);
  color: #0d1117;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem 2rem;
  transform: rotate(40deg);
  white-space: nowrap;
}
.coming-soon-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: .85rem 0 .3rem;
  overflow: hidden;
}
.coming-soon-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--warn), var(--accent2));
  border-radius: 2px;
}
.coming-soon-pct { font-size: .75rem; color: var(--muted); }

.pro-badge {
  font-size: .65rem;
  background: #1a2a3a;
  color: var(--warn);
  border: 1px solid #2a3a5a;
  padding: .1rem .4rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: .04em;
  vertical-align: middle;
}

/* ---- PLANS SECTION ---- */
.plans-section {
  text-align: center;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0 0 2rem;
}
.plans-title { font-size: 1.6rem; font-weight: 700; margin-bottom: .5rem; }
.plans-sub { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; max-width: 580px; margin-left: auto; margin-right: auto; }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}
.plan-free { border-color: #2a5a2a; }
.plan-pro  { border-color: rgba(88,166,255,.4); }
.plan-name { font-size: 1.2rem; font-weight: 700; margin-bottom: .4rem; }
.plan-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 1.2rem;
}
.plan-price span { font-size: .9rem; color: var(--muted); font-weight: 400; }
.plan-price small { font-size: .85rem; color: var(--muted); font-weight: 400; }
.plan-features {
  list-style: none;
  font-size: .875rem;
  line-height: 1.9;
  color: var(--text);
}
.plan-features li.disabled { color: var(--muted); }
.plan-ribbon {
  position: absolute;
  top: 12px; right: -24px;
  background: var(--accent2);
  color: #0d1117;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem 2.5rem;
  transform: rotate(40deg);
}

/* ---- HOW IT WORKS ---- */
.how-it-works {
  padding: 2rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 760px;
  margin: 2rem auto 0;
  text-align: center;
}
.how-it-works h3 { color: var(--accent2); margin-bottom: 1.25rem; font-size: 1.05rem; }
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  max-width: 160px;
}
.step-n {
  width: 32px; height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
  flex-shrink: 0;
}
.step p { font-size: .82rem; color: var(--muted); text-align: center; }
.step-arrow { color: var(--muted); font-size: 1.2rem; padding-top: 8px; }

/* ---- AD SLOTS ---- */
.ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: .5rem 1rem;
}
.ad-leaderboard {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.ad-rectangle { margin: 1.5rem auto; }
.ad-banner { max-width: 900px; width: 100%; }

.ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  width: 728px; max-width: 100%;
  height: 90px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: default;
}
.ad-placeholder-wide {
  width: 100%;
  max-width: 900px;
  height: 90px;
}
.ad-rectangle .ad-placeholder {
  width: 300px;
  height: 250px;
}
.ad-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  opacity: .5;
}
.ad-size {
  font-size: .7rem;
  color: var(--muted);
  opacity: .4;
  font-family: monospace;
}
.ntc-box { margin-top: .5rem; padding: .6rem .8rem; border-radius: 6px; }
.ntc-box.ok    { background: #0d2a0d; border: 1px solid #1a4a1a; }
.ntc-box.warn  { background: #2a1a00; border: 1px solid #4a3a00; }
.ntc-box.error { background: #2a0d0d; border: 1px solid #4a1a1a; }

/* ---- SPINNER ---- */
.spinner {
  display: none;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- FOOTER ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
  margin-top: 4rem;
}
footer strong { color: var(--accent2); }
