/* Negato — flat, light, no external fonts or libraries (LCP budget: zero requests beyond this file) */

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --border: #e4e7ec;
  --text: #14161b;
  --muted: #5c6470;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --danger: #dc2626;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img, canvas, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.brand-glyph { width: 24px; height: 24px; color: var(--accent); }

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

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 44px 20px 26px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.tagline {
  max-width: 620px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- tool / dropzone ---------- */

.tool {
  max-width: 900px;
  padding-bottom: 30px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 250px;
  padding: 36px 24px;
  text-align: center;
  background: var(--surface);
  border: 2px dashed #c9cfd9;
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropzone:hover,
body.is-dragging .dropzone {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-icon { width: 46px; height: 46px; color: var(--accent); margin-bottom: 8px; }

.drop-title { font-size: 1.2rem; font-weight: 600; }

.drop-sub { color: var(--muted); font-size: 0.95rem; }

.linklike { color: var(--accent); font-weight: 600; }

.drop-meta { margin-top: 10px; color: #8a919d; font-size: 0.82rem; }

kbd {
  padding: 1px 6px;
  font-size: 0.8em;
  font-family: inherit;
  background: #fff;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
}

/* ---------- workspace ---------- */

.modebar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  padding: 4px;
  margin: 0 auto 12px;
  width: fit-content;
  max-width: 100%;
  background: var(--surface);
  border-radius: var(--r-md);
}

.mode-btn {
  padding: 9px 18px;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--r-sm);
  transition: color 0.12s ease, background-color 0.12s ease;
}

.mode-btn:hover { color: var(--text); }

.mode-btn.is-active {
  color: var(--accent);
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.channelbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  transition: opacity 0.15s ease;
}

.channelbar.is-disabled { opacity: 0.35; pointer-events: none; }

.channel-label { font-size: 0.85rem; color: var(--muted); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: #cbd2dc; }

.chip-r .dot { background: #ef4444; }
.chip-g .dot { background: #22c55e; }
.chip-b .dot { background: #3b82f6; }

.chip.is-on { color: var(--text); border-color: #b9c0cc; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }

/* ---------- compare slider ---------- */

.compare-outer { display: flex; justify-content: center; }

.compare {
  --pos: 50%;
  position: relative;
  max-width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: repeating-conic-gradient(#eceef2 0% 25%, #f8f9fb 0% 50%) 0 0 / 20px 20px;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.1);
  touch-action: none;
  cursor: col-resize;
  user-select: none;
  -webkit-user-select: none;
}

.compare canvas { width: 100%; height: 100%; }

.before-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.before-wrap img { width: 100%; height: 100%; }

.compare-label {
  position: absolute;
  top: 10px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(17, 20, 28, 0.62);
  border-radius: 999px;
  pointer-events: none;
}

.label-before { left: 10px; }
.label-after { right: 10px; }

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 0;
  cursor: col-resize;
}

.compare-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1.5px;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.45);
}

.grip {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  color: var(--accent);
}

.grip svg { width: 20px; height: 20px; }

/* ---------- actions ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 22px;
}

.btn {
  padding: 13px 30px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.btn-primary {
  color: #fff;
  background: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  color: var(--text);
  background: #fff;
  border: 1px solid #cfd5de;
}
.btn-ghost:hover { border-color: #9aa3b2; }

.privacy-note {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- tabs & panels (edit page) ---------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  padding: 4px;
  margin: 0 auto 14px;
  width: fit-content;
  max-width: 100%;
  background: var(--surface);
  border-radius: var(--r-md);
}

.tab {
  padding: 9px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--r-sm);
}

.tab:hover { color: var(--text); }

.tab.is-active {
  color: var(--accent);
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.toolpanel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  margin: 0 auto 18px;
  padding: 13px 18px;
  width: fit-content;
  max-width: 100%;
  background: var(--surface);
  border-radius: var(--r-md);
}

.toolpanel label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.toolpanel input[type="color"] {
  width: 38px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  cursor: pointer;
}

.toolpanel input[type="range"] { width: 130px; accent-color: var(--accent); }

.toolpanel .tol-val { min-width: 26px; font-variant-numeric: tabular-nums; color: var(--text); }

.panel-note {
  flex-basis: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.compare.is-picking { cursor: crosshair; }

/* ---------- drag overlay ---------- */

.drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(79, 70, 229, 0.08);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

body.is-dragging .drag-overlay { display: flex; }

.drag-overlay-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  border: 3px dashed var(--accent);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.85);
}

/* ---------- content / prose ---------- */

.content {
  padding: 40px 20px 20px;
}

.content h2 {
  margin: 2.2em 0 0.6em;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.content h2:first-child { margin-top: 0; }

.content p, .content li { color: #333a45; line-height: 1.75; }

.content p { margin: 0.7em 0; }

.content ol, .content ul { margin: 0.7em 0 0.7em 1.4em; }

.content li { margin: 0.4em 0; }

.faq h3 {
  margin: 1.6em 0 0.3em;
  font-size: 1.05rem;
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 46px;
  padding-bottom: 30px;
}

.card {
  display: block;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: #c7cdd8;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.08);
}

.card h3 { font-size: 1.05rem; color: var(--accent); }

.card p { margin-top: 6px; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

.card .card-cta { display: inline-block; margin-top: 12px; font-size: 0.85rem; font-weight: 600; }

/* ---------- breadcrumb ---------- */

.breadcrumb {
  padding: 18px 20px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); }
.breadcrumb .sep { margin: 0 7px; color: #b6bdc9; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 60px;
  padding: 44px 0 34px;
  background: #101319;
  color: #9aa3b2;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-brand { display: flex; align-items: center; gap: 9px; font-size: 1.1rem; font-weight: 700; color: #fff; }

.footer-brand .brand-glyph { color: #818cf8; }

.footer-about { margin-top: 12px; max-width: 340px; line-height: 1.65; }

.footer-col h4 {
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.footer-col a { display: block; margin: 8px 0; color: #9aa3b2; }
.footer-col a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #232a35;
  font-size: 0.84rem;
  text-align: center;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 100;
  padding: 11px 20px;
  font-size: 0.92rem;
  font-weight: 500;
  color: #fff;
  background: #1c212c;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translateX(-50%);
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 0.86rem; }
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .mode-btn { padding: 9px 13px; font-size: 0.87rem; }
  .hero { padding-top: 34px; }
}

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