/* ============================================================
   Favicon generator — single stylesheet, no dependencies.
   System font stack: zero webfont cost for the UI itself.
   ============================================================ */

:root {
  --accent: #4f46e5;
  --accent-dark: #3730a3;
  --accent-light: #eef2ff;
  --ink: #111827;
  --ink-soft: #4b5563;
  --ink-faint: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(17, 24, 39, .08), 0 4px 16px rgba(17, 24, 39, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ---------------- Header ---------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img { width: 28px; height: 28px; }

.header-nav { display: flex; gap: 22px; }

.header-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 600;
}

.header-nav a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .header-nav { display: none; }
}

/* ---------------- Hero ---------------- */

.hero {
  text-align: center;
  padding: 44px 0 8px;
}

.hero h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -.02em;
}

.hero .tagline {
  max-width: 640px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.hero .trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-faint);
  font-size: .88rem;
  font-weight: 600;
}

.hero .trust-row li::before {
  content: "✓";
  color: #059669;
  margin-right: 6px;
  font-weight: 800;
}

/* ---------------- Tool layout ---------------- */

.tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  margin: 32px auto 12px;
}

@media (max-width: 860px) {
  .tool { grid-template-columns: minmax(0, 1fr); }
}

.panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-faint);
}

/* Mode tabs */

.mode-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
}

.mode-tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px 6px;
  border-radius: 8px;
  font: 600 .92rem var(--font);
  color: var(--ink-soft);
  cursor: pointer;
}

.mode-tab.is-active {
  background: var(--bg);
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(17, 24, 39, .12);
}

/* Drop zone */

.drop-zone {
  border: 2px dashed #c7d2fe;
  border-radius: var(--radius);
  background: var(--accent-light);
  padding: 30px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.drop-zone.is-dragover,
.drop-zone:hover { border-color: var(--accent); background: #e0e7ff; }

.drop-zone p { margin: 6px 0; color: var(--ink-soft); font-size: .95rem; }
.drop-zone .drop-main { font-weight: 700; color: var(--ink); font-size: 1rem; }
.drop-zone .drop-hint { font-size: .82rem; color: var(--ink-faint); }

.drop-zone #drop-thumb {
  display: none;
  width: 64px; height: 64px;
  object-fit: contain;
  margin: 0 auto 8px;
  border-radius: 8px;
  background:
    conic-gradient(#e5e7eb 90deg, transparent 90deg 180deg, #e5e7eb 180deg 270deg, transparent 270deg)
    0 0 / 16px 16px;
}

.drop-zone.has-image #drop-thumb { display: block; }
.drop-zone.has-image .drop-icon { display: none; }

#drop-filename { font-weight: 600; word-break: break-all; }

/* Fields */

.field { margin: 14px 0; }

.field > label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field input[type="text"],
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 400 1rem var(--font);
  color: var(--ink);
  background: var(--bg);
}

.field input[type="text"]:focus,
.field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }

input[type="color"] {
  width: 44px; height: 34px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
}

input[type="range"] { width: 100%; accent-color: var(--accent); }

.range-label {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.range-label output { color: var(--accent); }

/* Swatches */

.swatch-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.swatch {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(17, 24, 39, .15);
  cursor: pointer;
  padding: 0;
}

.swatch:hover { transform: scale(1.1); }

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.check-label input { accent-color: var(--accent); width: 16px; height: 16px; }

/* Emoji picks */

.emoji-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.emoji-pick {
  font-size: 1.4rem;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 8px;
  padding: 6px 9px;
  cursor: pointer;
  line-height: 1;
}

.emoji-pick:hover { background: var(--accent-light); border-color: var(--accent); }

/* Advanced options */

details.advanced {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

details.advanced summary {
  cursor: pointer;
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink-soft);
}

/* ---------------- Preview panel ---------------- */

#preview-empty {
  color: var(--ink-faint);
  text-align: center;
  padding: 60px 20px;
  font-size: .95rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.preview-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--bg-soft);
}

.preview-card h3 {
  margin: 0 0 10px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-faint);
}

/* Browser tab mockups */

.tab-mock {
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 8px 8px 0 0;
  padding: 7px 10px;
  font-size: .78rem;
  white-space: nowrap;
  overflow: hidden;
}

.tab-mock img { width: 16px; height: 16px; flex: none; }
.tab-mock.light { background: #fff; border: 1px solid var(--line); color: #333; }
.tab-mock.dark { background: #292a2d; color: #ddd; margin-top: 6px; }

/* Google result mockup */

.google-mock { display: flex; gap: 10px; align-items: flex-start; }

.google-mock .g-fav {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex: none;
}

.google-mock .g-fav img { width: 18px; height: 18px; }
.google-mock .g-title { color: #1a0dab; font-size: .9rem; line-height: 1.3; }
.google-mock .g-url { color: #006621; font-size: .75rem; }

/* Home screen mockups */

.homescreen { display: flex; gap: 18px; justify-content: center; }
.homescreen figure { margin: 0; text-align: center; }

.homescreen img.ios {
  width: 58px; height: 58px;
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.homescreen img.android {
  width: 58px; height: 58px;
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.homescreen figcaption { font-size: .72rem; color: var(--ink-faint); margin-top: 5px; }

.preview-large {
  display: grid;
  place-items: center;
  min-height: 96px;
  background:
    conic-gradient(#e5e7eb 90deg, transparent 90deg 180deg, #e5e7eb 180deg 270deg, transparent 270deg)
    0 0 / 20px 20px;
  border-radius: 8px;
}

.preview-large img { width: 84px; height: 84px; }

/* ---------------- Actions ---------------- */

.actions { margin-top: 20px; }

.btn-primary {
  display: block;
  width: 100%;
  padding: 15px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: 800 1.05rem var(--font);
  cursor: pointer;
  transition: background .15s;
}

.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-secondary {
  display: inline-block;
  margin-top: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink-soft);
  font: 700 .85rem var(--font);
  cursor: pointer;
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Field help text */

.field-help {
  margin: 6px 0 0;
  font-size: .8rem;
  color: var(--ink-faint);
  line-height: 1.45;
}

/* Snippet / install steps */

.snippet-block { margin-top: 16px; }

.install-steps {
  margin: 10px 0 8px;
  padding-left: 20px;
  font-size: .88rem;
  color: var(--ink-soft);
}

.install-steps li { margin: 5px 0; }
.install-steps strong { color: var(--ink); }

.ai-note {
  margin: 12px 0 0;
  font-size: .84rem;
  color: var(--ink-soft);
  line-height: 1.55;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.link-btn {
  border: 0;
  padding: 0;
  background: none;
  font: 700 inherit var(--font);
  font-size: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.link-btn:hover { color: var(--accent-dark); }

.install-link {
  display: inline-block;
  margin-top: 10px;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
}

.install-link:hover { text-decoration: underline; }

.snippet-block pre {
  background: #0f172a;
  color: #e2e8f0;
  font: .78rem/1.5 var(--mono);
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
  margin: 8px 0 0;
}

/* ---------------- Toast ---------------- */

#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: .9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
  max-width: 90vw;
}

#toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- Ad slots ---------------- */

.ad-slot {
  margin: 28px auto;
  text-align: center;
  min-height: 0;
}

.ad-slot[data-ads-enabled="false"] { display: none; }

/* ---------------- Content sections ---------------- */

.content-section { padding: 44px 0; }
.content-section.alt { background: var(--bg-soft); }

.content-section h2 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: -.01em;
  margin: 0 0 16px;
}

.content-section h3 { font-size: 1.12rem; margin: 26px 0 8px; }

.content-section p, .content-section li { color: var(--ink-soft); }

.content-section .lede { font-size: 1.05rem; max-width: 760px; }

.prose { max-width: 760px; }

/* Reasons — editorial two-column list with icons.
   Icons: Font Awesome Free 6 (fontawesome.com), CC BY 4.0, inlined as SVG. */

.reason-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
  margin: 34px 0 0;
}

.reason {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding: 22px 0 26px;
}

.reason .reason-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.reason .reason-icon svg { width: 17px; height: 17px; }

.reason h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
  letter-spacing: -.01em;
}

.reason p {
  margin: 0;
  font-size: .95rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

@media (max-width: 720px) {
  .reason-list { grid-template-columns: 1fr; }
}

/* Tool index — hairline link rows */

.tool-links {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.tool-links a {
  display: grid;
  grid-template-columns: 260px 1fr auto;
  align-items: baseline;
  gap: 6px 20px;
  padding: 18px 6px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.tool-links .tool-name { font-weight: 700; color: var(--ink); }
.tool-links .tool-desc { color: var(--ink-soft); font-size: .93rem; }
.tool-links .tool-arrow { color: var(--accent); font-weight: 700; transition: transform .15s; }
.tool-links a:hover { background: var(--bg-soft); }
.tool-links a:hover .tool-name { color: var(--accent); }
.tool-links a:hover .tool-arrow { transform: translateX(4px); }

@media (max-width: 640px) {
  .tool-links a { grid-template-columns: 1fr auto; }
  .tool-links .tool-desc { grid-column: 1 / -1; }
}

/* PWA app-name hint under the download button */

.pwa-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  border-radius: 8px;
  font-size: .85rem;
  color: #92400e;
  line-height: 1.45;
}

.pwa-hint button {
  border: 0;
  padding: 0;
  background: none;
  font: 700 .85rem var(--font);
  color: #92400e;
  text-decoration: underline;
  cursor: pointer;
}

/* Size table */

.size-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  font-size: .92rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.size-table th, .size-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.size-table th { background: var(--bg-soft); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }
.size-table tr:last-child td { border-bottom: 0; }
.size-table code { font-family: var(--mono); font-size: .84em; background: var(--accent-light); padding: 2px 5px; border-radius: 4px; }

@media (max-width: 640px) {
  .size-table { display: block; overflow-x: auto; }
}

/* Code blocks in content */

.content-section pre {
  background: #0f172a;
  color: #e2e8f0;
  font: .84rem/1.6 var(--mono);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
}

.content-section :not(pre) > code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--accent-light);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--accent-dark);
}

/* FAQ */

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; font-weight: 400; flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-answer { padding: 0 0 16px; max-width: 720px; }
.faq-item .faq-answer p { margin-top: 0; }

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--ink);
  color: #9ca3af;
  padding: 36px 0;
  font-size: .88rem;
  margin-top: 44px;
}

.site-footer a { color: #d1d5db; text-decoration: none; }
.site-footer a:hover { color: #fff; }

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  justify-content: space-between;
}

.footer-cols nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------------- Print / reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
