/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── VARIABLES ── */
:root {
  --bg:         #FFFFFF;
  --bg2:        #F7F7F7;
  --surface:    #FFFFFF;
  --border:     #E5E7EB;
  --border2:    #D1D5DB;
  --ink:        #111827;
  --muted:      #6B7280;
  --muted2:     #9CA3AF;
  --accent:     #16A34A;
  --accent-lt:  #F0FDF4;
  --accent-mid: #BBF7D0;
  --red:        #EF4444;
  --red-lt:     #FEF2F2;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--ink); min-height: 100vh; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(1.5rem,5vw,4rem); height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-size: .82rem; font-weight: 500; color: var(--muted); text-decoration: none; transition: color .18s; }
.nav-links a:hover { color: var(--ink); }
.nav-back { font-size: .82rem; font-weight: 500; color: var(--muted); text-decoration: none; transition: color .18s; }
.nav-back:hover { color: var(--ink); }

/* ── BREADCRUMB ── */
.breadcrumb {
  max-width: 1200px; margin: 0 auto;
  padding: 1.2rem clamp(1.5rem,5vw,4rem) 0;
  display: flex; align-items: center; gap: .5rem;
  font-size: .78rem; color: var(--muted2);
}
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .18s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--muted2); }

/* ── PAGE HERO ── */
.page-hero { max-width: 1200px; margin: 0 auto; padding: 2rem clamp(1.5rem,5vw,4rem) 0; }
.page-hero h1 { font-size: clamp(1.7rem,3.5vw,2.4rem); font-weight: 700; letter-spacing: -.035em; color: var(--ink); margin-bottom: .6rem; }
.page-hero p { font-size: .95rem; color: var(--muted); line-height: 1.7; max-width: 56ch; }

/* ── TOOL WRAP ── */
.tool-wrap { max-width: 1200px; margin: 2rem auto 0; padding: 0 clamp(1.5rem,5vw,4rem); }
.tool-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
@media(max-width:860px){ .tool-layout { grid-template-columns: 1fr; } }

/* ── COMMON INPUTS ── */
textarea {
  width: 100%; resize: vertical;
  border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--bg2); padding: 1rem 1.1rem;
  font-family: 'Inter', sans-serif; font-size: .9rem;
  color: var(--ink); outline: none; line-height: 1.75;
  transition: border-color .2s, box-shadow .2s;
}
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22,163,74,.1); background: #fff; }
textarea::placeholder { color: var(--muted2); }
textarea[readonly] { cursor: default; }
textarea[readonly]:focus { border-color: var(--border); box-shadow: none; background: var(--bg2); }

/* ── EDITOR GRID (side by side) ── */
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media(max-width:700px){ .editor-grid { grid-template-columns: 1fr; } }
.editor-col { display: flex; flex-direction: column; gap: .5rem; }
.editor-label { font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted2); }

/* ── COMMON TOOLBAR ── */
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.toolbar-left { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.tb-btn { border: 1.5px solid var(--border); background: var(--surface); border-radius: 7px; padding: .42rem 1rem; font-family: 'Inter', sans-serif; font-size: .8rem; font-weight: 500; color: var(--muted); cursor: pointer; transition: all .15s; }
.tb-btn.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-lt); }
.copy-btn { display: inline-flex; align-items: center; gap: .45rem; background: var(--accent); color: #fff; border: 1.5px solid transparent; border-radius: 7px; padding: .42rem 1.1rem; font-family: 'Inter', sans-serif; font-size: .8rem; font-weight: 600; cursor: pointer; transition: background .18s; }
.copy-btn:hover { background: #15803D; }
.copy-btn.copied { background: #059669; }

/* ── STATS ROW ── */
.stats-row { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .75rem; color: var(--muted2); font-family: 'JetBrains Mono', monospace; }
.stat-item strong { color: var(--accent); }

/* ── SECTION LABELS ── */
.s-label { font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .7rem; display: block; }
.section-label { font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted2); margin-bottom: .5rem; display: block; }

/* ── OPTIONS (checkbox pills) ── */
.options-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.opt-label {
  display: flex; align-items: center; gap: .45rem;
  border: 1.5px solid var(--border); border-radius: 7px;
  padding: .38rem .9rem; background: var(--surface);
  font-size: .8rem; font-weight: 500; color: var(--muted);
  cursor: pointer; transition: all .15s; user-select: none;
}
.opt-label input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.opt-label:has(input:checked) { border-color: var(--accent); color: var(--accent); background: var(--accent-lt); }

/* ── SEO SECTION ── */
.seo-section { max-width: 1200px; margin: 3.5rem auto 0; padding: 0 clamp(1.5rem,5vw,4rem) 2rem; }
.seo-section h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.seo-section p { font-size: .88rem; color: var(--muted); line-height: 1.8; margin-bottom: 1rem; }
.seo-section p:last-child { margin-bottom: 0; }
.seo-section code { font-family: 'JetBrains Mono', monospace; font-size: .82rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; padding: .1rem .4rem; color: var(--accent); }

/* ── FAQ ── */
.faq-list { margin-top: 1.5rem; }
.faq-item { border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: .6rem; }
.faq-q { width: 100%; text-align: left; background: var(--surface); border: none; padding: 1rem 1.2rem; display: flex; justify-content: space-between; align-items: center; font-family: 'Inter', sans-serif; font-size: .88rem; font-weight: 600; color: var(--ink); cursor: pointer; transition: background .15s; gap: 1rem; }
.faq-q:hover { background: var(--bg2); }
.faq-q.open { background: var(--accent-lt); color: var(--accent); }
.faq-icon { font-size: 1rem; color: var(--muted2); flex-shrink: 0; transition: transform .2s; }
.faq-q.open .faq-icon { transform: rotate(45deg); color: var(--accent); }
.faq-a { display: none; padding: 0 1.2rem 1rem; font-size: .84rem; color: var(--muted); line-height: 1.8; background: var(--accent-lt); }
.faq-a.open { display: block; }

/* ── OTHER TOOLS ── */
.other-tools { background: var(--bg2); border-top: 1px solid var(--border); margin-top: clamp(2rem,5vw,4rem); }
.other-inner { max-width: 1200px; margin: 0 auto; padding: clamp(2.5rem,6vw,4rem) clamp(1.5rem,5vw,4rem); }
.other-inner h2 { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 1.2rem; }
.other-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: .6rem; }
.other-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 8px; padding: .9rem 1rem; text-decoration: none; display: flex; align-items: center; gap: .75rem; transition: border-color .15s, box-shadow .15s; }
.other-card:hover { border-color: var(--accent-mid); box-shadow: 0 2px 12px rgba(22,163,74,.08); }
.other-icon { font-size: 1.1rem; flex-shrink: 0; }
.other-name { font-size: .82rem; font-weight: 500; color: var(--ink); }

/* ── FOOTER ── */
footer { border-top: 1px solid var(--border); padding: 2rem clamp(1.5rem,5vw,4rem); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-copy { font-size: .78rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .78rem; color: var(--muted); text-decoration: none; transition: color .18s; }
.footer-links a:hover { color: var(--accent); }

/* ── COOKIE BANNER ── */
.cookie-banner { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 999; background: #fff; border-top: 1px solid var(--border); padding: 1rem clamp(1.5rem,5vw,4rem); }
.cookie-banner.show { display: block; }
.cookie-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cookie-text { font-size: .82rem; color: var(--muted); line-height: 1.6; }
.cookie-text a { color: var(--accent); }
.cookie-accept { background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: .45rem 1.2rem; font-family: 'Inter', sans-serif; font-size: .8rem; font-weight: 600; cursor: pointer; transition: background .18s; }
.cookie-accept:hover { background: #15803D; }
