/* ============================================================
   ClipCite — Citation generator page styles
   Extends the site tokens in ../styles.css
   ============================================================ */

.tool-hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
}
.tool-hero h1 { max-width: 20ch; margin-inline: auto; }
.tool-hero p.lede {
  max-width: 60ch;
  margin: 1rem auto 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}

/* ── Tool card ── */
.tool {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(30, 27, 75, 0.04), 0 12px 32px -18px rgba(55, 48, 163, 0.25);
  padding: clamp(1.25rem, 3vw, 2rem);
}

/* ── Tabs (mode + style) ── */
.tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tab {
  font-family: var(--ff);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--ink); }
.tab[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
}
.tab:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; }

.mode-tabs { margin-bottom: 1.25rem; }
.style-tabs { margin: 1.5rem 0 0.75rem; }

/* ── Fields ── */
.field { margin-bottom: 0.9rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.field .hint { font-weight: 400; color: var(--ink-soft); }
.field input,
.field textarea {
  width: 100%;
  font-family: var(--ff);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}
.field input:focus,
.field textarea:focus {
  outline: 2.5px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
.field textarea { resize: vertical; min-height: 3rem; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
}
@media (min-width: 560px) {
  .field-grid { grid-template-columns: 1fr 1fr; }
  .field-grid .col-span { grid-column: 1 / -1; }
}

.doi-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.doi-row .field { flex: 1 1 260px; margin-bottom: 0; }

/* ── Buttons ── */
.btn-primary {
  font-family: var(--ff);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: var(--radius);
  padding: 0.65rem 1.4rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--brand-bright); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-primary:focus-visible { outline: 2.5px solid var(--brand-deep); outline-offset: 2px; }
.doi-row .btn-primary { align-self: flex-end; }
.web-submit { margin-top: 0.4rem; }

/* ── Output ── */
.output-wrap {
  margin-top: 0.6rem;
  position: relative;
}
.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.output-head .lbl { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
#cite-output {
  font-family: var(--ff-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.btn-copy {
  font-family: var(--ff);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}
.btn-copy:hover { border-color: var(--brand); }

.cite-error {
  margin-top: 0.75rem;
  color: oklch(0.5 0.18 25);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── CTA banner ── */
.cta-banner {
  max-width: 760px;
  margin: 1.75rem auto 0;
  display: flex;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  color: var(--hero-text);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 2.5vw, 1.6rem) clamp(1.25rem, 3vw, 2rem);
}
.cta-banner .cta-copy { flex: 1 1 320px; }
.cta-banner h2 { color: var(--hero-text); font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
.cta-banner p { color: var(--hero-muted); margin-top: 0.35rem; max-width: 48ch; }
.cta-banner .btn-store {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  white-space: nowrap;
}
.cta-banner .btn-store:hover { filter: brightness(1.05); color: var(--accent-ink); }

/* ── SEO content + FAQ ── */
.tool-content { max-width: var(--reading-w); margin-inline: auto; }
.tool-content h2 { margin-top: 2.5rem; }
.tool-content h3 { margin-top: 1.5rem; }
.tool-content p, .tool-content li { color: var(--ink-soft); }
.tool-content ul { margin: 0.5rem 0 0 1.25rem; }
.faq-item { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.faq-item h3 { margin-top: 0; color: var(--ink); }
