/* Dados Testantes — static build
   Design: "Paper & Ink" — off-white base, dark ink, technical green accent.
*/
:root {
  --paper: #fbfbf5;
  --paper-2: #f3f3ec;
  --ink: #14161d;
  --ink-70: rgba(20, 22, 29, 0.7);
  --ink-60: rgba(20, 22, 29, 0.6);
  --ink-50: rgba(20, 22, 29, 0.5);
  --ink-40: rgba(20, 22, 29, 0.4);
  --ink-30: rgba(20, 22, 29, 0.3);
  --ink-10: rgba(20, 22, 29, 0.08);
  --brand: #12965a;
  --brand-soft: #d6f3e0;
  --line: #e3e3dd;
  --danger: #c33a3a;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
code, pre, .mono { font-family: var(--font-mono); }

.container { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { /*max-width: 56rem;*/ max-width: 95%; margin: 0 auto; padding: 0 1.5rem; }

/* Chrome */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251, 251, 245, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 72rem; margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: .625rem;
  font-weight: 800; letter-spacing: -0.02em;
}
.brand-mark {
  width: 1.75rem; height: 1.75rem; border-radius: .375rem;
  background: var(--ink); color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: .7rem;
}
.site-nav { display: flex; gap: 1.5rem; font-size: .875rem; }
.site-nav a { color: var(--ink-70); transition: color .15s; }
.site-nav a:hover { color: var(--ink); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 1.5rem;
  color: var(--ink-50); font-size: .75rem;
  font-family: var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase;
  text-align: center;
}

/* Hero */
.hero { padding: 5rem 1.5rem 3rem; text-align: center; max-width: 72rem; margin: 0 auto; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .25rem .75rem; border-radius: 999px;
  border: 1px solid rgba(18, 150, 90, 0.35);
  background: rgba(214, 243, 224, 0.5);
  color: var(--brand);
  font-family: var(--font-mono); font-size: .7rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.badge-dot {
  width: .5rem; height: .5rem; border-radius: 999px;
  background: var(--brand); position: relative;
}
.badge-dot::before {
  content: ""; position: absolute; inset: 0;
  border-radius: 999px; background: var(--brand);
  opacity: .6; animation: ping 1.6s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: .6; }
  75%, 100% { transform: scale(2.2); opacity: 0; }
}
h1.display {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800; letter-spacing: -0.03em;
  margin: 0 auto; max-width: 48rem; line-height: 1.05;
}
.italic-brand { font-style: italic; color: var(--brand); }
.hero p.lead {
  color: var(--ink-60); font-size: 1.125rem;
  max-width: 40rem; margin: 1.5rem auto 0;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 2rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.25rem; border-radius: .5rem;
  font-size: .875rem; font-weight: 700;
  border: 1px solid transparent; transition: all .15s;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: rgba(18, 150, 90, 0.5); }
.btn-sm { padding: .375rem .625rem; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-family: var(--font-mono); }

/* Sections */
section { padding: 3rem 0; }
.section-head { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }
@media (min-width: 768px) { .section-head { flex-direction: row; align-items: flex-end; } }
h2.title { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.subtle { color: var(--ink-60); margin-top: .5rem; }

/* Cards grid */
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .grid.cols-3-lg { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: .75rem; padding: 1.5rem;
  transition: all .2s; display: block;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 150, 90, 0.5);
  box-shadow: 0 10px 30px -15px rgba(15, 23, 42, 0.2);
}
.card-mark {
  width: 2.5rem; height: 2.5rem; border-radius: .5rem;
  background: var(--paper-2); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 700;
  letter-spacing: -0.03em; margin-bottom: 1rem;
  transition: all .2s;
}
.card:hover .card-mark { background: var(--brand-soft); color: var(--brand); }
.card h3 { margin: 0 0 .25rem; font-size: 1rem; font-weight: 700; }
.card p { margin: 0; font-size: .875rem; color: var(--ink-60); }
.card-cta {
  display: inline-flex; align-items: center; gap: .25rem;
  margin-top: 1rem;
  font-family: var(--font-mono); font-size: .625rem;
  font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-40); transition: color .15s;
}
.card:hover .card-cta { color: var(--brand); }

/* Search input */
.search {
  position: relative; width: 100%;
}
@media (min-width: 768px) { .search { width: 18rem; } }
.search input {
  width: 100%; padding: .5rem .75rem .5rem 2.25rem;
  border: 1px solid var(--line); border-radius: .5rem;
  background: #fff; font-size: .875rem;
  font-family: inherit; outline: none;
  transition: border-color .15s;
}
.search input:focus { border-color: rgba(18, 150, 90, 0.5); }
.search svg { position: absolute; top: 50%; left: .75rem; transform: translateY(-50%); color: var(--ink-40); }

/* Generator page */
.gen-page { padding: 3rem 0 6rem; }
.back-link {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-bottom: 2rem;
  font-family: var(--font-mono); font-size: .625rem;
  font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-50); transition: color .15s;
}
.back-link:hover { color: var(--ink); }
.gen-header { margin-bottom: 2.5rem; }
.gen-tag {
  display: inline-flex; align-items: center; gap: .75rem;
  margin-bottom: 1rem;
}
.gen-tag .card-mark { margin-bottom: 0; background: var(--ink); color: var(--paper); }
.gen-slug {
  font-family: var(--font-mono); font-size: .625rem;
  font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand);
}
.gen-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; letter-spacing: -0.03em; margin: 0;
}
.gen-header .desc { color: var(--ink-70); margin-top: 1rem; max-width: 40rem; }

/* Generator tool */
.tool {
  background: #fff; border: 1px solid var(--line);
  border-radius: 1rem; overflow: hidden;
  box-shadow: 0 20px 60px -30px rgba(15, 23, 42, 0.15);
}
.tool-body {
  display: grid; gap: 1.5rem; padding: 1.5rem;
}
@media (min-width: 768px) {
  .tool-body { grid-template-columns: 1fr 18rem; padding: 2.5rem; }
}
.tool-label {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .75rem;
}
.tool-label > span {
  font-family: var(--font-mono); font-size: .625rem;
  font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-50);
}
.tool-label-actions { display: flex; gap: .5rem; }

.result-box {
  background: rgba(243, 243, 236, 0.6);
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: 1.25rem 1.5rem;
  min-height: 5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.result-box code {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600; letter-spacing: .05em;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.result-list {
  max-height: 22rem; overflow: auto;
  background: rgba(243, 243, 236, 0.4);
  border: 1px solid var(--line); border-radius: .75rem;
  font-family: var(--font-mono); font-size: .875rem;
}
.result-list ul { margin: 0; padding: 0; list-style: none; }
.result-list li {
  display: flex; align-items: center; gap: 1rem;
  padding: .375rem 1rem;
  border-bottom: 1px solid rgba(227, 227, 221, 0.7);
}
.result-list li:hover { background: #fff; }
.result-list li:last-child { border-bottom: none; }
.result-list .idx {
  width: 2.5rem; text-align: right; font-size: .625rem;
  letter-spacing: .15em; color: var(--ink-40); font-variant-numeric: tabular-nums;
}
.result-list code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-more { text-align: center; padding: .75rem 1rem;
  font-family: var(--font-mono); font-size: .625rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink-50); }

/* Results table (multi-field) */
.result-table-wrap {
  max-height: 26rem; overflow: auto;
  background: rgba(243, 243, 236, 0.4);
  border: 1px solid var(--line); border-radius: .75rem;
}
.result-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-mono); font-size: .8125rem;
}
.result-table thead th {
  position: sticky; top: 0;
  background: var(--paper-2); color: var(--ink-70);
  text-align: left; padding: .625rem .75rem;
  font-family: var(--font-mono); font-size: .625rem;
  font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.result-table tbody td {
  padding: .5rem .75rem;
  border-bottom: 1px solid rgba(227, 227, 221, 0.7);
  white-space: nowrap;
}
.result-table tbody tr:hover { background: #fff; }
.result-table .idx { color: var(--ink-40); font-size: .625rem; letter-spacing: .15em; }

/* Sidebar / config panel */
.tool-side {
  display: flex; flex-direction: column; gap: .75rem;
  background: rgba(243, 243, 236, 0.4);
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: 1rem;
}
.field { display: flex; flex-direction: column; gap: .375rem; }
.field label {
  font-family: var(--font-mono); font-size: .625rem;
  font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-50);
}
.field input, .field select {
  width: 100%; padding: .5rem .75rem;
  border: 1px solid var(--line); border-radius: .5rem;
  background: #fff; font-family: var(--font-mono);
  font-size: 1rem; font-weight: 600;
  outline: none; transition: border-color .15s;
}
.field input:focus, .field select:focus { border-color: rgba(18, 150, 90, 0.5); }
.presets { display: flex; flex-wrap: wrap; gap: .375rem; }
.preset-btn {
  padding: .25rem .625rem; border-radius: .375rem;
  border: 1px solid var(--line); background: #fff;
  font-family: var(--font-mono); font-size: .6875rem;
  font-weight: 700; color: var(--ink-60);
  transition: all .15s;
}
.preset-btn:hover { border-color: var(--ink-30); }
.preset-btn.active {
  border-color: rgba(18, 150, 90, 0.4);
  background: var(--brand-soft); color: var(--brand);
}
.hint {
  font-family: var(--font-mono); font-size: .625rem;
  color: var(--ink-40);
}

.tool-generate {
  margin-top: .5rem;
  padding: 1rem 1.5rem; border-radius: .75rem;
  background: var(--ink); color: var(--paper);
  font-size: .875rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  border: none; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  transition: all .15s;
}
.tool-generate:hover:not(:disabled) { background: rgba(20, 22, 29, 0.9); }
.tool-generate:active { transform: scale(.97); }
.tool-generate:disabled { opacity: .55; cursor: not-allowed; }

.mask-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1rem; font-size: .875rem; color: var(--ink-70);
  cursor: pointer; user-select: none;
}
.mask-toggle input { accent-color: var(--brand); width: 1rem; height: 1rem; }

/* Custom fields builder (massa personalizada) */
.custom-fields { display: flex; flex-direction: column; gap: .5rem; }
.custom-field-row {
  display: grid; grid-template-columns: 1fr 1fr auto;
  gap: .375rem; align-items: center;
  border: 1px solid lightgray;
  border-radius: 4px;
  padding: 3px;
}
.custom-field-row input, .custom-field-row select {
  padding: .375rem .5rem; border: 1px solid var(--line);
  border-radius: .375rem; font-family: var(--font-mono);
  font-size: .8125rem; background: #fff;
}
.custom-field-row button {
  background: transparent; border: 1px solid var(--line);
  border-radius: .375rem; width: 1.75rem; height: 1.75rem;
  color: var(--ink-50);
}
.custom-field-row button:hover { color: var(--danger); border-color: var(--danger); }
.add-field-btn {
  background: transparent; border: 1px dashed var(--line);
  border-radius: .5rem; padding: .5rem;
  font-family: var(--font-mono); font-size: .6875rem;
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-60);
}
.custom-field-params{
    grid-column: 1 / 3;
}
.add-field-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Error / status */
.status {
  padding: .75rem 1rem; border-radius: .5rem;
  font-family: var(--font-mono); font-size: .8125rem;
}
.status.err { background: #fdecec; color: var(--danger); border: 1px solid rgba(195, 58, 58, 0.3); }
.status.info { background: var(--paper-2); color: var(--ink-70); border: 1px solid var(--line); }

/* FAQ */
details.faq {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
details.faq:last-child { border-bottom: none; }
details.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--ink-40); transition: transform .2s; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { margin: .75rem 0 0; font-size: .875rem; color: var(--ink-70); }
.faq-wrap { border: 1px solid var(--line); background: #fff; border-radius: 1rem; overflow: hidden; }

/* Utilities */
.hidden { display: none !important; }
.mt-6 { margin-top: 1.5rem; }
.mt-10 { margin-top: 2.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
