:root {
  --bg: #0d0f14;
  --surface: #12161e;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.08);
  --primary: #6ee7f7;
  --primary-glow: rgba(110, 231, 247, 0.15);
  --primary-dark: #38bcd4;
  --text: #e8edf5;
  --muted: #6b7a96;
  --line: rgba(255, 255, 255, 0.1);
  --ok: #34d399;
  --ok-glow: rgba(52, 211, 153, 0.15);
  --bad: #f87171;
  --bad-glow: rgba(248, 113, 113, 0.15);
  --input-bg: rgba(255, 255, 255, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* subtle grid texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 231, 247, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 247, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1000px, 92vw);
  margin: 0 auto;
}

/* ── Topbar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--primary);
  text-shadow: 0 0 20px var(--primary);
}

.nav-links {
  display: flex;
  gap: 0.4rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.nav-links a:hover {
  color: var(--primary);
  border-color: var(--panel-border);
  background: var(--primary-glow);
}

/* ── Main layout ── */
main {
  padding: 2rem 0 3rem;
  display: grid;
  gap: 1.5rem;
}

/* ── Panel card ── */
.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

/* top accent line */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.4;
}

.panel {
  padding: 1.8rem 2rem;
}

/* ── Typography ── */
h1 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e8edf5 30%, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.subtitle {
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.subtitle strong {
  color: var(--primary);
  font-weight: 600;
}

/* ── Grid ── */
.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ── Labels ── */
label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ── Inputs ── */
input,
select,
textarea,
button {
  font: inherit;
}

input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7a96' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.2rem;
}

select option {
  background: #1a1f2b;
  color: var(--text);
}

input:not([type="checkbox"]):focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  background: rgba(110, 231, 247, 0.05);
  box-shadow: 0 0 0 3px var(--primary-glow), inset 0 0 0 1px rgba(110, 231, 247, 0.1);
}

input:not([type="checkbox"])::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

textarea {
  resize: vertical;
  min-height: 220px;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  line-height: 1.7;
  font-family: "Fira Code", "Consolas", monospace;
}

/* ── Checkbox row ── */
.checkbox-row {
  margin: 0.5rem 0 1rem;
}

.check-item {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

/* ── Button ── */
.btn-holder {
  display: flex;
  align-items: flex-end;
}

.btn-holder.bottom {
  align-items: center;
}

button {
  width: 100%;
  background: var(--primary);
  color: #0d0f14;
  border: none;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 20px var(--primary-glow);
  position: relative;
  overflow: hidden;
}

button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
}

button:hover {
  background: #8aeef8;
  box-shadow: 0 0 32px rgba(110, 231, 247, 0.4);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 0 16px var(--primary-glow);
}

/* ── Results label + copy button ── */
.results-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.results-label-row label {
  margin-bottom: 0;
}

.copy-btn {
  width: auto;
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(110, 231, 247, 0.35);
  padding: 0.3rem 0.85rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  box-shadow: none;
  transition: all 0.2s;
}

.copy-btn::after {
  display: none;
}

.copy-btn:hover:not(:disabled) {
  background: var(--primary-glow);
  border-color: var(--primary);
  box-shadow: none;
  transform: none;
}

.copy-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Validation result ── */
.validation {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.25s;
}

.validation.ok {
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.3);
  background: var(--ok-glow);
}

.validation.bad {
  color: var(--bad);
  border-color: rgba(248, 113, 113, 0.3);
  background: var(--bad-glow);
}

.validation.idle {
  color: var(--muted);
}

/* ── Section divider ── */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 1.4rem 0;
  border: none;
}

/* ── Utilities ── */
.hidden {
  display: none !important;
}

.grid.one {
  grid-template-columns: 1fr;
  margin-top: 1rem;
}

/* ── BIN brand hint ── */
.bin-brand-hint {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.bin-brand-hint.visible {
  opacity: 1;
}

/* ── Label note ── */
.label-note {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  opacity: 0.7;
}

/* ── Section title shared ── */
.section-title {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Info sections shared ── */
.info-section {
  padding-top: 1.8rem;
}

/* ── Intro section ── */
.intro-section {
  text-align: center;
  padding: 2.6rem 2rem 2rem;
}

.intro-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  border: 1px solid rgba(110, 231, 247, 0.3);
  background: var(--primary-glow);
  border-radius: 20px;
  padding: 0.25rem 0.85rem;
  margin-bottom: 1rem;
}

.intro-title {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e8edf5 30%, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.intro-lead {
  max-width: 680px;
  margin: 0 auto 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.intro-lead strong {
  color: var(--primary);
  font-weight: 600;
}

.intro-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.chip {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 0.28rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  background: var(--input-bg);
  color: var(--muted);
}

/* ── Key Parameters grid ── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.2rem;
}

.info-card {
  background: var(--input-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 1.1rem 1rem;
}

.info-icon {
  font-size: 1.4rem;
  margin-bottom: 0.55rem;
  line-height: 1;
}

.info-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.info-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.65;
}

.info-card code {
  font-family: "Fira Code", "Consolas", monospace;
  font-size: 0.78rem;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* ── Key Features list ── */
.features-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
}

.feature-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 0.55rem;
  box-shadow: 0 0 6px var(--primary);
}

.feature-item strong {
  color: var(--text);
}

/* ── How to Use steps ── */
.steps-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-item {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
}

.step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary);
  border: 1px solid rgba(110, 231, 247, 0.3);
  border-radius: 6px;
  background: var(--primary-glow);
  margin-top: 0.1rem;
}

.step-item strong {
  color: var(--text);
}

.step-item code {
  font-family: "Fira Code", "Consolas", monospace;
  font-size: 0.78rem;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* ── Use Cases grid ── */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.2rem;
}

.use-case-card {
  background: var(--input-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 1.1rem 1rem;
  transition: border-color 0.2s;
}

.use-case-card:hover {
  border-color: rgba(110, 231, 247, 0.2);
}

.use-case-icon {
  font-size: 1.5rem;
  margin-bottom: 0.55rem;
  line-height: 1;
}

.use-case-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.use-case-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── FAQ accordion ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.faq-item {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--input-bg);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: rgba(110, 231, 247, 0.25);
}

.faq-item summary {
  padding: 0.9rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.1rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: 0;
  padding: 0 1rem 0.9rem;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.7;
  border-top: 1px solid var(--panel-border);
  padding-top: 0.75rem;
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--panel-border);
  margin-top: 1rem;
  padding: 2rem 0;
  background: rgba(13, 15, 20, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.footer-brand {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--primary);
  text-shadow: 0 0 12px var(--primary);
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
}

.footer-note {
  font-size: 0.72rem;
  opacity: 0.6;
}

.footer-disclaimer {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.45;
  max-width: 560px;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 760px) {
  .info-grid,
  .use-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .panel {
    padding: 1.2rem 1.1rem;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .info-grid,
  .use-cases-grid {
    grid-template-columns: 1fr;
  }

  .intro-title {
    font-size: 1.5rem;
  }
}
