/* Green Screen Remover — styles
   One stylesheet, no framework, no web fonts. */

:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --ink: #131b28;
  --ink-2: #5a6679;
  --ink-3: #8b95a6;
  --line: #dde3ec;
  --line-2: #eef1f6;
  --accent: #1266f1;
  --accent-ink: #ffffff;
  --ok: #0f7a4a;
  --warn: #8a5a12;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(19, 27, 40, .05), 0 8px 28px rgba(19, 27, 40, .06);
}

* { box-sizing: border-box; }

/* Author `display` beats the UA sheet's `[hidden] { display: none }`, so the
   hidden attribute needs saying out loud — .editor/.field/.scrub are flex/grid. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

main { max-width: 1080px; margin: 0 auto; padding: 0 20px 72px; }

/* ---------- header (deliberately small: the tool is the first screen) ---------- */
.top { max-width: 1080px; margin: 0 auto; padding: 26px 20px 14px; }
.top h1 { margin: 0 0 6px; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; }
.lede { margin: 0; color: var(--ink-2); font-size: 16px; max-width: 62ch; }

/* ---------- tool shell ---------- */
.tool {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

/* ---------- dropzone ---------- */
.drop {
  border: 2px dashed #c3cddd;
  border-radius: var(--radius);
  background: #f8fafd;
  padding: 40px 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop:focus-visible { border-color: var(--accent); background: #f2f7ff; outline: none; }
.drop.is-over { border-color: var(--accent); background: #e9f1ff; }
.drop-icon { width: 34px; height: 34px; color: var(--accent); display: block; margin: 0 auto 10px; }
.drop-title { margin: 0 0 4px; font-size: 19px; font-weight: 650; }
.drop-sub { margin: 0; color: var(--ink-2); }
.drop-sub .link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.drop-note { margin: 12px 0 0; color: var(--ink-3); font-size: 13px; }

/* ---------- editor layout ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.stage { min-width: 0; }
.panel { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ---------- compare stage ---------- */
.compare {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #d9dfe8 25%, transparent 25%, transparent 75%, #d9dfe8 75%),
    linear-gradient(45deg, #d9dfe8 25%, transparent 25%, transparent 75%, #d9dfe8 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
}
.compare[data-bg="dark"]  { background-image: none; background-color: #14181f; }
.compare[data-bg="light"] { background-image: none; background-color: #f6f8fb; }

.layer { display: block; width: 100%; height: auto; }
.split {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  margin-left: -1px; background: #fff;
  box-shadow: 0 0 0 1px rgba(19, 27, 40, .22);
  pointer-events: none;
}
.split::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 1px rgba(19, 27, 40, .22), 0 2px 6px rgba(19, 27, 40, .25);
}
.tag {
  position: absolute; top: 8px; padding: 3px 8px; border-radius: 20px;
  background: rgba(19, 27, 40, .62); color: #fff;
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  pointer-events: none;
}
.tag-left { left: 8px; }
.tag-right { right: 8px; }

.compare-range {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y;
  -webkit-appearance: none; appearance: none; background: transparent;
}

.stagebar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-top: 10px;
}
.stagebar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.meta {
  color: var(--ink-3); font-size: 13px;
  font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.scrub { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.scrub input[type=range] { flex: 1 1 auto; min-width: 0; }
.time { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- chips ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: 13px; padding: 5px 11px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 20px;
  background: #fff; color: var(--ink-2);
}
.chip:hover { border-color: #b9c4d6; color: var(--ink); }
.chip.is-on { background: #e9f1ff; border-color: #a9c5f7; color: #0f4bb8; font-weight: 600; }

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label {
  font-size: 13px; font-weight: 650; letter-spacing: .01em;
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
.field-label output {
  font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums; font-size: 13px;
}
.hint { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.scale {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--ink-3);
}
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

input[type=color] {
  width: 46px; height: 34px; padding: 2px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}

input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px; background: #d9e0ea;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; margin-top: -6px;
  border-radius: 50%; background: var(--accent);
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(19, 27, 40, .35);
}
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: #d9e0ea; }
input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff;
}
input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 15px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
}
.btn:hover { border-color: #b9c4d6; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-small { font-size: 13px; padding: 6px 11px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #0d55cc; border-color: #0d55cc; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn.is-on { background: #e9f1ff; border-color: #a9c5f7; color: #0f4bb8; }

.actions { display: flex; flex-direction: column; gap: 8px; }
.actions .btn { width: 100%; }

.status { margin: 0; font-size: 13px; color: var(--ink-2); min-height: 1.4em; }
.status.is-ok { color: var(--ok); }
.status.is-warn { color: var(--warn); }

/* ---------- long-form copy ---------- */
.doc { margin-top: 40px; max-width: 74ch; }
.doc h2 { font-size: 21px; margin: 34px 0 10px; letter-spacing: -.01em; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 16px; margin: 22px 0 4px; }
.doc p { margin: 0 0 12px; color: #26303f; }
.doc .muted { color: var(--ink-3); font-size: 14px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.doc ul.cols { list-style: none; padding-left: 0; }
.doc ul.cols li {
  padding: 10px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; margin-bottom: 8px;
}
.doc ol.steps { counter-reset: s; list-style: none; padding-left: 0; }
.doc ol.steps li { counter-increment: s; position: relative; padding-left: 38px; }
.doc ol.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #e9f1ff; color: #0f4bb8;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- site nav (shared by every page) ---------- */
.nav {
  max-width: 1080px; margin: 0 auto; padding: 16px 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--accent); }
.brand-dot {
  width: 18px; height: 18px; flex: 0 0 auto; border-radius: 5px;
  background: #00b140; position: relative;
}
.brand-dot::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff;
}
.navlinks { display: flex; gap: 18px; flex-wrap: wrap; }
.navlinks a {
  color: var(--ink-2); text-decoration: none; font-size: 14.5px;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.navlinks a:hover { color: var(--accent); }
.navlinks a[aria-current="page"] {
  color: var(--ink); font-weight: 650; border-bottom-color: var(--accent);
}

/* ---------- long-form page shell (about / privacy / contact / 404) ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 4px 20px 0; }
.page h1 { font-size: 30px; line-height: 1.15; margin: 20px 0 8px; letter-spacing: -.02em; }
.page .sub { margin: 0 0 4px; color: var(--ink-2); font-size: 16.5px; max-width: 62ch; }
.page .updated { margin: 10px 0 0; color: var(--ink-3); font-size: 13px; }
.page h2 { font-size: 20px; margin: 30px 0 8px; letter-spacing: -.01em; }
.page h3 { font-size: 16px; margin: 20px 0 4px; }
.page p { margin: 0 0 12px; color: #26303f; }
.page ul, .page ol { margin: 0 0 14px; padding-left: 20px; }
.page li { margin-bottom: 7px; }
.page .box {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow); padding: 18px 20px; margin: 18px 0;
}
.page .box p:last-child, .page .box ul:last-child { margin-bottom: 0; }
.page .mail {
  font-size: 19px; font-weight: 650; word-break: break-all;
  color: var(--accent); text-decoration: none;
}
.page .mail:hover { text-decoration: underline; text-underline-offset: 2px; }
.page .note { color: var(--ink-3); font-size: 14px; }
.page .backlinks { margin: 26px 0 0; font-size: 14.5px; }

.foot {
  max-width: 1080px; margin: 48px auto 0; padding: 22px 20px 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: 13px;
}
.footlinks { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.footlinks a { color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.footlinks a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.foot p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
  .panel { gap: 14px; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  main { padding: 0 12px 56px; }
  .top { padding: 18px 12px 10px; }
  .top h1 { font-size: 24px; }
  .lede { font-size: 15px; }
  .tool { padding: 12px; }
  .drop { padding: 28px 14px; }
  .drop-title { font-size: 17px; }
  .tag { font-size: 10px; padding: 2px 7px; }
  .split::after { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
  .actions { flex-direction: column; }
  .btn { padding: 11px 15px; }         /* bigger touch targets */
  .stagebar { gap: 8px; }
  .doc h2 { font-size: 19px; }
  .nav { padding: 12px 12px 0; }
  .navlinks { gap: 14px; }
  .navlinks a { font-size: 14px; }
  .page { padding: 0 12px; }
  .page h1 { font-size: 24px; }
  .page h2 { font-size: 18px; }
  .page .box { padding: 14px 15px; }
  .page .mail { font-size: 16.5px; }
  .foot { margin-top: 36px; padding: 18px 12px 32px; }
  .footlinks { gap: 14px; }
}
