/* ── Onethread Free Tools — Base Tool Styles ── */
:root {
  --p: #6938ef;
  --p-d: #5a2fd6;
  --p-lt: #ede9fc;
  --p-llt: #f5f3ff;
  --text: #1d2939;
  --text2: #475467;
  --text3: #667085;
  --border: #e2e4ec;
  --bg: #ffffff;
  --bg2: #f9fafb;
  --bg3: #f3f0fe;
  --r: 12px;
  --r-lg: 18px;
  --sh: 0 4px 24px rgba(105,56,239,.10), 0 1px 6px rgba(0,0,0,.05);
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;}
body{font-family:'Inter',sans-serif;background:var(--bg2);color:var(--text);line-height:1.6;}
a{text-decoration:none;color:inherit;}
img{max-width:100%;}
ul,ol{padding-left:1.4em;}

/* HERO */
#hero {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fc 60%, #e4ddf9 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(105,56,239,.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--p-lt); color: var(--p);
  font-size: 11.5px; font-weight: 700; letter-spacing: .5px;
  padding: 5px 14px; border-radius: 100px; margin-bottom: 20px;
  border: 1px solid rgba(105,56,239,.2);
}
.hero-badge-dot {
  width: 6px; height: 6px; background: var(--p);
  border-radius: 50%; animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.8)}}
#hero h1 {
  font-size: clamp(26px,4vw,46px); font-weight: 800;
  color: var(--text); line-height: 1.1; letter-spacing: -.5px; margin-bottom: 16px;
}
#hero h1 span { color: var(--p); }
#hero p {
  font-size: 17px; color: var(--text2);
  max-width: 540px; margin: 0 auto; line-height: 1.7;
}

/* TOOL WRAPPER */
#tool-wrapper {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

/* TOOL CARD (form + output grid) */
.tool-card {
  display: grid;
  grid-template-columns: 380px 1fr;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(105,56,239,.13), 0 2px 8px rgba(0,0,0,.06);
  background: #fff;
  border: 1px solid rgba(105,56,239,.15);
}

/* FORM PANEL */
.form-panel {
  background: var(--p-llt);
  border-right: 1px solid rgba(105,56,239,.12);
  display: flex; flex-direction: column;
}
.form-panel-header {
  background: linear-gradient(135deg, var(--p) 0%, var(--p-d) 100%);
  padding: 20px 24px;
  display: flex; align-items: center; gap: 12px;
}
.form-panel-header-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.18); border: 6px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.form-panel-header-text h3 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.form-panel-header-text p { font-size: 12px; color: rgba(255,255,255,.72); }
.ai-chip {
  margin-left: auto;
  background: rgba(255,255,255,.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  font-size: 10px; font-weight: 800; letter-spacing: .6px;
  padding: 4px 11px; border-radius: 100px;
  text-transform: uppercase;
}
.form-body { padding: 24px; flex: 1; overflow-y: auto; }
form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px; font-weight: 700; color: var(--text3);
  letter-spacing: .6px; text-transform: uppercase;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid rgba(105,56,239,.2); border-radius: 10px;
  font-size: 14px; font-family: 'Inter', sans-serif;
  color: var(--text); background: #fff; outline: none;
  transition: border-color .18s, box-shadow .18s;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text3); font-size: 13.5px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--p); box-shadow: 0 0 0 3px rgba(105,56,239,.08);
}
.field select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.field textarea { resize: vertical; min-height: 90px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

#generateBtn {
  width: 100%; padding: 13px 16px;
  background: var(--p); color: #fff; border: none;
  border-radius: var(--r); font-size: 14.5px; font-weight: 700;
  font-family: 'Inter', sans-serif; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 18px rgba(105,56,239,.3);
  transition: background .18s, transform .12s, box-shadow .18s;
  margin-top: 4px;
}
#generateBtn:hover { background: var(--p-d); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(105,56,239,.4); }
#generateBtn:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-spinner {
  display: none; align-items: center; gap: 8px;
  animation: none;
}
.btn-spinner svg { animation: spin 1s linear infinite; }
@keyframes spin{to{transform:rotate(360deg)}}

/* OUTPUT PANEL */
.output-panel { background: #fff; display: flex; flex-direction: column; }
.output-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.output-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; color: var(--text);
}
.output-actions { display: flex; align-items: center; gap: 8px; }
#stopBtn, #copyBtn {
  display: none; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif; border: none;
}
#stopBtn { background: #fee2e2; color: #b91c1c; }
#copyBtn { background: var(--p-lt); color: var(--p); }
#stopBtn:hover { background: #fecaca; }
#copyBtn:hover { background: #ddd6fe; }
.output-body { flex: 1; overflow-y: auto; padding: 28px; min-height: 420px; background: var(--bg2); }
#output { font-size: 14px; line-height: 1.8; color: var(--text); }
#output.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 380px; }
.out-empty { text-align: center; color: var(--text3); }
.out-empty-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--p-lt); color: var(--p);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; border: 8px solid var(--p-llt);
}
.out-empty p { font-size: 14px; }
.out-error { color: #b91c1c; background: #fee2e2; padding: 14px; border-radius: 10px; font-size: 14px; }
#output h1 { font-size: 1.4em; color: var(--p); margin: .9em 0 .4em; }
#output h2 { font-size: 1.2em; color: #4f26c4; margin: .8em 0 .3em; border-bottom: 1px solid var(--border); padding-bottom: 5px; }
#output h3 { font-size: 1.05em; color: var(--p); margin: .7em 0 .25em; }
#output p { margin: .4em 0; }
#output ul, #output ol { padding-left: 1.4em; }
#output li { margin-bottom: 4px; }
#output strong { color: var(--text); font-weight: 700; }
#output table { border-collapse: collapse; width: 100%; margin: .8em 0; }
#output th, #output td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
#output th { background: var(--p-lt); color: var(--p); font-weight: 700; }
#output code { background: var(--p-llt); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
#output pre { background: var(--p-llt); padding: 14px; border-radius: 10px; overflow-x: auto; }
.cursor-blink { display: inline-block; animation: blink .7s step-end infinite; color: var(--p); }
@keyframes blink{0%,100%{opacity:1}50%{opacity:0}}

/* PAGE SECTIONS */
.pg-section { padding: 64px 24px; }
.pg-section:nth-child(even) { background: #fff; }
.pg-section:nth-child(odd) { background: var(--bg2); }
.pg-inner { max-width: 1100px; margin: 0 auto; }
.section-eyebrow {
  display: block; background: var(--p-lt); color: var(--p);
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; padding: 5px 14px; border-radius: 100px; margin-bottom: 12px;
  width: fit-content; margin-left: auto; margin-right: auto;
}
.section-h2 { font-size: clamp(22px,3vw,34px); font-weight: 800; color: var(--text); margin-bottom: 10px; line-height: 1.2; text-align: center; }
.section-h2 span { color: var(--p); }
.section-lead { font-size: 15.5px; color: var(--text2); max-width: 600px; line-height: 1.7; margin: 0 auto; }

/* FEATURES GRID */
.feat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-top: 40px; }
.feat-card { background: #fff; border: 1px solid var(--border); border-bottom: 4px solid var(--p); border-radius: var(--r); padding: 24px 20px; }
.feat-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--p-lt); color: var(--p);
  border: 6px solid var(--p-llt);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.feat-icon svg { width: 22px; height: 22px; }
.feat-card h3 { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.feat-card p { font-size: 13px; color: var(--text2); line-height: 1.6; }

/* HOW IT WORKS */
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 40px; max-width: 900px; }
.step-card { background: #fff; border: 1px solid var(--border); border-bottom: 4px solid var(--p); border-radius: var(--r); padding: 28px 24px; text-align: center; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--p); color: #fff; font-size: 16px; font-weight: 800;
  border: 6px solid var(--p-llt);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.step-card h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.step-card p { font-size: 13px; color: var(--text2); line-height: 1.6; }

/* CONTENT SECTIONS — What Is / How to Use / Key Elements / Tips / Why Not */
.what-is-text {
  font-size: 15.5px; color: var(--text2); line-height: 1.85;
  max-width: 720px; margin: 16px auto 0;
}

.how-to-steps {
  max-width: 720px; margin: 32px auto 0;
  border: 1.5px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; background: #fff;
}
.how-to-step {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.how-to-step:last-child { border-bottom: none; }
.step-num-inline {
  min-width: 28px; height: 28px;
  background: var(--p); color: #fff;
  border-radius: 50%; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px; flex-shrink: 0;
}
.step-content { font-size: 14px; color: var(--text2); line-height: 1.65; }
.step-content strong { color: var(--text); font-weight: 700; }

.key-elements-list {
  max-width: 720px; margin: 32px auto 0;
  display: flex; flex-direction: column; gap: 12px;
}
.key-element-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 18px 20px;
}
.key-element-num {
  min-width: 30px; height: 30px;
  background: var(--p-lt); color: var(--p);
  border-radius: 8px; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.key-element-body { font-size: 13.5px; color: var(--text2); line-height: 1.75; }
.key-element-body strong { color: var(--text); font-weight: 700; }

.tips-list {
  max-width: 720px; margin: 32px auto 0;
  display: flex; flex-direction: column; gap: 10px;
}
.tip-item {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 13.5px; color: var(--text2); line-height: 1.75;
  background: var(--p-llt); border: 1px solid rgba(105,56,239,.12);
  border-radius: var(--r); padding: 14px 18px;
}
.tip-dot {
  min-width: 8px; height: 8px; background: var(--p);
  border-radius: 50%; margin-top: 7px; flex-shrink: 0;
}
.tip-item strong { color: var(--text); font-weight: 700; }

.why-not-list {
  max-width: 720px; margin: 32px auto 0;
  display: flex; flex-direction: column; gap: 14px;
}
.why-not-item {
  background: #fff; border: 1.5px solid var(--border);
  border-left: 4px solid var(--p); border-radius: var(--r);
  padding: 18px 22px;
}
.why-not-item h4 { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.why-not-item p { font-size: 13.5px; color: var(--text2); line-height: 1.75; }

/* FAQ */
.faq-list { max-width: 720px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; transition: border-color .2s; }
.faq-item.open { border-color: var(--p); }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; cursor: pointer; gap: 12px; user-select: none; }
.faq-q-text { font-size: 14.5px; font-weight: 600; color: var(--text); flex: 1; }
.faq-q-icon {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg2); color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s, transform .3s;
}
.faq-q-icon svg { width: 14px; height: 14px; }
.faq-item.open .faq-q-icon { background: var(--p); color: #fff; transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s, padding .3s; padding: 0 20px; }
.faq-item.open .faq-a { max-height: 400px; padding-bottom: 16px; }
.faq-a p { font-size: 13.5px; color: var(--text2); line-height: 1.7; }

/* CTA BANNER */
.cta-banner {
  background: linear-gradient(135deg, #2d1b69 0%, #4c2db0 50%, #6938ef 100%);
  padding: 72px 24px; text-align: center;
}
.cta-inner { max-width: 560px; margin: 0 auto; }
.cta-banner h2 { font-size: clamp(24px,3vw,36px); font-weight: 800; color: #fff; margin-bottom: 12px; }
.cta-banner p { font-size: 16px; color: rgba(255,255,255,.7); margin-bottom: 28px; line-height: 1.65; }
.cta-btn {
  display: inline-block; padding: 14px 36px;
  background: #fff; color: var(--p);
  font-size: 15px; font-weight: 700; border-radius: var(--r);
  text-decoration: none; transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.25); }

/* ABOUT SECTION */
.about-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 40px; }
.about-item { background: var(--p-llt); border: 1px solid rgba(105,56,239,.12); border-radius: var(--r); padding: 24px; }
.about-item h3 { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.about-item p { font-size: 13.5px; color: var(--text2); line-height: 1.7; }

/* ── FORM UI STYLE VARIANTS (all use same purple, different structure) ── */

/* style-dark: near-black header, white form body */
.tool-card.style-dark .form-panel-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
.tool-card.style-dark .form-panel-header-icon {
  background: rgba(105,56,239,.25);
  border-color: rgba(105,56,239,.45);
}
.tool-card.style-dark .ai-chip { background: var(--p); border: none; }
.tool-card.style-dark .form-panel { background: #fff; border-right-color: var(--border); }

/* style-minimal: no gradient, clean white header + purple left-border accent */
.tool-card.style-minimal {
  box-shadow: 0 2px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  border-color: var(--border);
}
.tool-card.style-minimal .form-panel {
  background: #fff;
  border-right-color: var(--border);
  border-left: 4px solid var(--p);
}
.tool-card.style-minimal .form-panel-header {
  background: var(--p-llt);
  border-bottom: 1px solid var(--border);
}
.tool-card.style-minimal .form-panel-header-icon { background: var(--p-lt); border: 1px solid rgba(105,56,239,.2); color: var(--p); }
.tool-card.style-minimal .form-panel-header-text h3 { color: var(--text); }
.tool-card.style-minimal .form-panel-header-text p  { color: var(--text3); }
.tool-card.style-minimal .ai-chip { background: var(--p); color: #fff; border: none; }

/* LAYOUT VARIANTS */

/* Stacked: form full-width on top with 2-col field grid, output full-width below */
.tool-card.layout-stacked {
  grid-template-columns: 1fr;
}
.tool-card.layout-stacked .form-panel {
  border-right: none;
  border-bottom: 1px solid rgba(105,56,239,.12);
}
.tool-card.layout-stacked .form-body form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  align-items: start;
}
.tool-card.layout-stacked .form-body form > *:last-child {
  grid-column: 1 / -1;
}
.tool-card.layout-stacked .output-panel { min-height: 340px; }

/* Centered: narrow 640px card centered, single-column, clean & minimal */
.tool-card.layout-centered {
  grid-template-columns: 1fr;
  max-width: 640px;
  margin: 0 auto;
}
.tool-card.layout-centered .form-panel {
  border-right: none;
  border-bottom: 1px solid rgba(105,56,239,.12);
}
.tool-card.layout-centered .output-panel { min-height: 300px; }

/* RESPONSIVE */
@media (max-width: 960px) {
  .tool-card { grid-template-columns: 1fr; }
  .form-panel { border-right: none; border-bottom: 1px solid var(--border); }
  .feat-grid { grid-template-columns: repeat(2,1fr); }
  .about-grid { grid-template-columns: repeat(2,1fr); }
  /* Reset custom layouts on mobile */
  .tool-card.layout-centered { max-width: 100%; }
  .tool-card.layout-stacked .form-body form { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #hero { padding: 52px 20px 60px; }
  .feat-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .tool-card { border-radius: 12px; }
}
