/* ── Tokens (from ez128.com) ───────────────────────────── */
:root {
  --ez-cyan:        #14b8d4;
  --ez-cyan-600:    #0e95ad;
  --ez-cyan-50:     #e6f8fb;
  --ez-ink:         #0f1417;
  --ez-ink-2:       #2a3238;
  --ez-muted:       #6b7580;
  --ez-paper:       #faf7f2;
  --ez-paper-2:     #f3ede3;
  --ez-line:        rgba(15, 20, 23, 0.10);
  --ez-line-strong: rgba(15, 20, 23, 0.18);
  --ez-card:        #fbf9f4;
  --ez-danger:      #c5524a;
  --ez-good:        #4a9d6e;
  --radius-card:    14px;
  --radius-pill:    999px;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  background: var(--ez-paper);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  color: var(--ez-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  line-height: 1.5;
}
a    { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
img    { max-width: 100%; display: block; }

/* ── Page background (dot grid + soft cyan wash) ───────── */
.page {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 900px 500px at 18% 22%, rgba(20, 184, 212, 0.10), transparent 70%),
    radial-gradient(circle, rgba(15, 20, 23, 0.08) 1px, transparent 1.4px);
  background-size: auto, 22px 22px;
  background-position: 0 0, 0 0;
}

/* ── Layout ────────────────────────────────────────────── */
.outer { padding: 0 56px; }
@media (max-width: 720px) { .outer { padding: 0 18px; } }

/* ── NAV (matches ez128.com sticky-blur pattern) ───────── */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ez-line);
}
.nav-outer { padding: 0 48px; }
.nav-row {
  padding: 9px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  cursor: pointer;
}
.nav-logo-mark {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  flex-shrink: 0;
}
.nav-logo-tld { color: var(--ez-cyan-600); }
.nav-logo-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--ez-muted);
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--ez-cyan);
  color: white;
  box-shadow: 0 4px 12px rgba(20, 184, 212, 0.3);
  white-space: nowrap;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.nav-cta:hover {
  background: var(--ez-cyan-600);
  box-shadow: 0 4px 16px rgba(20, 184, 212, 0.45);
}

/* ── Section heads ─────────────────────────────────────── */
.section { padding: 56px 0 100px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--ez-cyan-600);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}
.section-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}
.section-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ez-muted);
  letter-spacing: 0.08em;
}

/* ── Tools grid (compact density baked in) ─────────────── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.tool-card {
  background: var(--ez-card);
  border: 1px solid var(--ez-line);
  border-radius: var(--radius-card);
  padding: 16px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 132px;
  position: relative;
  overflow: hidden;
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--ez-cyan);
  box-shadow: 0 12px 32px -18px rgba(20,184,212,0.35);
  background: white;
}
.tool-card .icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--ez-cyan-50);
  color: var(--ez-cyan-600);
  display: flex; align-items: center; justify-content: center;
}
.tool-card h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.tool-card p {
  font-size: 13px;
  color: var(--ez-ink-2);
  line-height: 1.5;
}
.tool-card .tag {
  position: absolute;
  top: 16px; right: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--ez-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.tool-card .arrow {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ez-cyan-600);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tool-card:hover .arrow svg { transform: translateX(3px); }
.tool-card .arrow svg { transition: transform .2s ease; }

/* ── Tool view (single tool page) ──────────────────────── */
.tool-view { padding: 36px 0 100px; }
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ez-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  cursor: pointer;
  width: fit-content;
}
.crumb:hover { color: var(--ez-cyan-600); }

.tool-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ez-line);
}
.tool-header .icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--ez-cyan-50);
  color: var(--ez-cyan-600);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tool-header h1 {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tool-header p {
  color: var(--ez-ink-2);
  font-size: 15px;
}

/* ── Panel + fields (input/output) ─────────────────────── */
.panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.panel.single { grid-template-columns: 1fr; }
.field {
  background: var(--ez-card);
  border: 1px solid var(--ez-line);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.field-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--ez-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.field-actions { display: flex; gap: 6px; }
.icon-btn {
  background: transparent;
  border: 1px solid var(--ez-line);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: var(--ez-ink-2);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all .15s ease;
}
.icon-btn:hover { border-color: var(--ez-ink); color: var(--ez-ink); background: white; }
.icon-btn.success { border-color: var(--ez-good); color: var(--ez-good); }
.icon-btn:disabled { opacity: .5; cursor: not-allowed; }

textarea, input[type=text], input[type=number] {
  width: 100%;
  border: none;
  background: transparent;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ez-ink);
  resize: vertical;
  outline: none;
  padding: 0;
}
textarea { min-height: 280px; }
textarea::placeholder, input::placeholder { color: var(--ez-muted); }

/* ── Controls row + segmented ──────────────────────────── */
.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
}
.seg {
  display: inline-flex;
  background: var(--ez-card);
  border: 1px solid var(--ez-line);
  border-radius: var(--radius-pill);
  padding: 3px;
}
.seg button {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ez-ink-2);
  cursor: pointer;
}
.seg button.active {
  background: var(--ez-ink);
  color: var(--ez-paper);
}

.err {
  color: var(--ez-danger);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin-top: 6px;
}
.hint {
  color: var(--ez-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

/* ── QR-specific ───────────────────────────────────────── */
.qr-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 10px;
  padding: 24px;
  min-height: 320px;
  border: 1px dashed var(--ez-line);
}
.qr-stage canvas { max-width: 100%; height: auto; }
.qr-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.qr-control label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ez-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.qr-control input, .qr-control select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--ez-line);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: white;
  color: var(--ez-ink);
  outline: none;
}
.qr-control input[type=color] { padding: 3px; height: 36px; cursor: pointer; }
.qr-control input:focus, .qr-control select:focus { border-color: var(--ez-cyan); }

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--ez-line);
  padding: 28px 0 40px;
  margin-top: 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ez-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 720px) {
  .nav-outer { padding: 0 18px; }
  .panel { grid-template-columns: 1fr; }
  .qr-controls { grid-template-columns: 1fr; }
  .tool-header h1 { font-size: 24px; }
}
