/* linesdedupe.com — "Mac window" editor sheet
   Calm, light, Apple-marketing feel. Zero dependencies, no images, no build step.
   One coherent system: macOS Notes / Settings light surfaces + a floating app window. */

:root {
  /* canvas */
  --paper: #f6f6f8;
  --paper-2: #fbfbfd;
  --text: #1d1d1f;
  --text-2: #3a3a3f;
  --muted: #6e6e73;
  --faint: #6e6e73;   /* small text — AA on white */
  --hair: rgba(0, 0, 0, .085);
  --hair-strong: rgba(0, 0, 0, .14);

  /* window / controls */
  --win: #ffffff;
  --chrome: linear-gradient(180deg, #fcfcfd, #f1f1f4);
  --field: #f7f7f9;
  --field-2: #fbfbfc;
  --field-hover: #f2f2f5;

  /* accent */
  --accent: #0071e3;
  --accent-deep: #0066cc;
  --accent-soft: rgba(0, 113, 227, .1);
  --accent-ring: rgba(0, 113, 227, .28);
  --ok: #1d9c56;
  --ok-soft: rgba(29, 156, 86, .1);
  --warn: #b06a00;

  /* shape */
  --r-win: 20px;
  --r-field: 12px;
  --r-ctl: 9px;

  /* elevation — soft, wide, never harsh */
  --sh-window:
    0 0 0 .5px rgba(0, 0, 0, .1),
    0 1px 2px rgba(0, 0, 0, .04),
    0 14px 32px -14px rgba(23, 28, 40, .16),
    0 48px 90px -36px rgba(23, 28, 40, .28);
  --sh-pop:
    0 0 0 .5px rgba(0, 0, 0, .07),
    0 2px 6px rgba(0, 0, 0, .06),
    0 22px 44px -22px rgba(23, 28, 40, .35);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  color-scheme: light;
  font-family: var(--font-sans);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -.006em;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- ambient colour fields (pure CSS "marketing page" glow) ---------- */
.ambient {
  position: absolute;
  inset: 0 0 auto 0;
  height: 1180px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 52%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 52%, transparent 100%);
}
.ambient i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .85;
  will-change: transform;
}
.blob-a {
  width: 46vw; height: 46vw; min-width: 420px; min-height: 420px;
  top: -16vw; left: -12vw;
  background: radial-gradient(closest-side, #cfe0ff, rgba(207, 224, 255, 0) 72%);
  animation: drift-a 30s ease-in-out infinite alternate;
}
.blob-b {
  width: 40vw; height: 40vw; min-width: 360px; min-height: 360px;
  top: -14vw; right: -10vw;
  background: radial-gradient(closest-side, #e6dcff, rgba(230, 220, 255, 0) 72%);
  animation: drift-b 36s ease-in-out infinite alternate;
}
.blob-c {
  width: 34vw; height: 34vw; min-width: 300px; min-height: 300px;
  top: 14vw; left: 38vw;
  background: radial-gradient(closest-side, #d8f3e6, rgba(216, 243, 230, 0) 72%);
  opacity: .7;
  animation: drift-c 42s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate3d(4vw, 3vw, 0) scale(1.06); } }
@keyframes drift-b { to { transform: translate3d(-3vw, 4vw, 0) scale(1.08); } }
@keyframes drift-c { to { transform: translate3d(-2vw, -3vw, 0) scale(1.1); } }

/* ---------- layout shell ---------- */
.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4.5vw, 44px);
}

/* the window bleeds 14px past the text column so the editorial copy and the
   app window do not share a hard left edge */
@media (min-width: 1100px) {
  .window { margin-left: -14px; margin-right: -14px; }
}

/* ---------- masthead: oversized wordmark left, quiet about-link right ---------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  /* nudge the wordmark left so its optical edge lines up with the headline */
  padding: 26px 0 8px;
  margin-left: -8px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--text);
  text-decoration: none;
}
.wordmark .mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(160deg, #4aa3ff, #0071e3 55%, #0055b3);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.wordmark .mark svg { width: 15px; height: 15px; display: block; }
.wordmark .dim { color: var(--faint); font-weight: 500; }
.masthead .pages { font-size: 13px; color: var(--muted); }

/* ---------- page nav: plain text links with a "current" pill ---------- */
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin: 8px 0 0;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  font-size: 13.5px;
  letter-spacing: -.005em;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid var(--hair);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.nav a {
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
}
.nav a:hover { color: var(--text); background: rgba(0, 0, 0, .045); }
.nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .09), 0 0 0 .5px rgba(0, 0, 0, .07);
}

/* ---------- hero copy: large, quiet, editorial ---------- */
.hero { padding: clamp(34px, 6vw, 74px) 0 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 5px 12px 5px 10px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .005em;
  color: var(--text-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--hair);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, .16);
}
.hero h1 {
  max-width: 15ch;
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.045em;
  color: var(--text);
}
.hero h1 em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(96deg, #0071e3, #6d5df6 55%, #b06ad8);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero .lead {
  max-width: 46ch;
  margin: 0 0 30px;
  font-size: clamp(1.04rem, 1.5vw, 1.24rem);
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: -.01em;
}

/* ============================================================
   The app window — a floating macOS sheet
   ============================================================ */
.window {
  position: relative;
  margin: clamp(28px, 4.5vw, 52px) 0 0;
  border-radius: var(--r-win);
  background: var(--win);
  box-shadow: var(--sh-window);
  isolation: isolate;
}
/* the sheet's own hairline (kept off box-shadow so the pulse can reuse it) */
.window::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(0, 0, 0, .09);
  pointer-events: none;
  z-index: 3;
}

/* ---------- title bar with traffic lights ---------- */
.titlebar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 46px;
  border-radius: var(--r-win) var(--r-win) 0 0;
  background: var(--chrome);
  border-bottom: 1px solid var(--hair);
  user-select: none;
}
.lights { display: inline-flex; gap: 8px; align-items: center; }
.lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .14);
}
.lights .l-red { background: #ff5f57; }
.lights .l-yellow { background: #febc2e; }
.lights .l-green { background: #28c840; }
.window-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--muted);
  white-space: nowrap;
}
.window-title svg { width: 13px; height: 13px; opacity: .55; }
.titlebar .title-right {
  justify-self: end;
  font-size: 12.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- body of the window ---------- */
.window-body { padding: clamp(14px, 2.2vw, 22px); }

/* ============================================================
   Segmented control (the Mac "view switcher")
   ============================================================ */
.segmented {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 16px;
}
.seg {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 7px 13px;
  border-radius: 11px;
  background: var(--field);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .02);
  font-size: 13.5px;
}
.seg > .seg-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.seg-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.seg-divider {
  width: 1px;
  height: 16px;
  background: var(--hair-strong);
  flex: none;
}
.seg label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: color .15s ease;
}
.seg label:hover { color: var(--text); }
.seg .seg-select { display: inline-flex; align-items: center; gap: 6px; }
.seg .seg-select > span { color: var(--muted); font-size: 12.5px; }

/* custom checkbox — macOS-style rounded square */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  display: inline-grid;
  place-content: center;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, .22);
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
input[type="checkbox"]::after {
  content: "";
  width: 8px;
  height: 4.5px;
  border-left: 1.8px solid #fff;
  border-bottom: 1.8px solid #fff;
  transform: rotate(-45deg) translate(.5px, -1px) scale(0);
  transition: transform .14s cubic-bezier(.2, .9, .2, 1.4);
}
input[type="checkbox"]:hover { border-color: rgba(0, 0, 0, .34); }
input[type="checkbox"]:checked {
  background: linear-gradient(180deg, #2f8dff, var(--accent));
  border-color: var(--accent-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 1px 2px rgba(0, 113, 227, .28);
}
input[type="checkbox"]:checked::after { transform: rotate(-45deg) translate(.5px, -1px) scale(1); }

/* native selects, de-chromed to look like Mac pop-up buttons */
select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  padding: 5px 27px 5px 9px;
  border-radius: 7px;
  border: 1px solid var(--hair-strong);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 2.2 5 5.6l4-3.4' fill='none' stroke='%236e6e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .04), inset 0 1px 0 rgba(255, 255, 255, .9);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
select:hover { border-color: rgba(0, 0, 0, .24); }
select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* toolbar buttons on the right of the segmented row */
.seg-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ---------- compare page: mode as a native select, kept inside the seg ---------- */
.seg .seg-select#modeWrap > span { color: var(--muted); }
#mode { min-width: 9.5rem; }

/* ---------- compare page: List A / List B sit side by side ---------- */
.editor.is-compare .pane-head h2 .dot { background: #c4c4c9; }
.editor.is-compare .pane:nth-child(1) .pane-head h2 .dot { background: var(--accent); }
.editor.is-compare .pane:nth-child(3) .pane-head h2 .dot { background: #8b5cf6; }
.compare-split {
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.compare-split span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--hair);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.compare-split svg { width: 13px; height: 13px; }
@media (min-width: 861px) { .editor.is-compare { grid-template-columns: 1fr 30px 1fr; } }
@media (max-width: 860px) { .compare-split { display: none; } }

/* recent chips can carry a two-line hint on the compare page */
.chip-meta.is-pair { color: var(--accent-deep); }

/* ============================================================
   Buttons
   ============================================================ */
button {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -.005em;
  color: #fff;
  /* primary: the one blue action per view */
  background: linear-gradient(180deg, #2b8cff, var(--accent) 52%, var(--accent-deep));
  border: 1px solid #0062c8;
  border-radius: var(--r-ctl);
  padding: 7px 15px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 1px 2px rgba(0, 80, 180, .22);
  transition: filter .15s ease, transform .12s ease, background-color .15s ease,
    border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
button:hover { filter: brightness(1.05); }
button:active { transform: translateY(.5px); filter: brightness(.97); }

/* secondary: white "materials" button */
button.ghost {
  color: var(--text);
  font-weight: 500;
  background: #fff;
  border: 1px solid var(--hair-strong);
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, .05);
}
button.ghost:hover {
  background: #fafafb;
  border-color: rgba(0, 0, 0, .2);
  filter: none;
}

/* ---------- focus rings (keyboard only) ---------- */
:focus-visible,
button:focus-visible,
.nav a:focus-visible,
a:focus-visible,
select:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
textarea:focus-visible { outline: none; }

/* ============================================================
   Editor: two elegant panes inside the window
   ============================================================ */
.editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 14px;
}
.pane {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;   /* output matches the input when the human drags it taller */
  min-width: 0;
  border-radius: 14px;
  background: var(--field-2);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .02);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.pane:focus-within {
  background: #fff;
  border-color: rgba(0, 113, 227, .45);
  box-shadow: 0 0 0 3.5px var(--accent-ring), inset 0 1px 2px rgba(0, 0, 0, .02);
}
.pane.is-output { background: #fcfcfd; }

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--hair);
}
.pane-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
  color: var(--faint);
}
.pane-head h2 .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c4c4c9;
}
.pane.is-output .pane-head h2 .dot { background: var(--ok); }
.pane .actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.pane-head button { padding: 5px 11px; font-size: 12.5px; }

textarea {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: clamp(230px, 34vh, 330px);
  padding: 15px 16px;
  resize: vertical;
  border: 0;
  border-radius: 0 0 13px 13px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.72;
  letter-spacing: 0;
  -webkit-font-smoothing: auto;
  transition: color .2s ease;
}
textarea:focus { outline: none; }
textarea::placeholder { color: #a3a3a8; }
#output { color: var(--text-2); }

/* the sliding accent rule between the two panes */
.split-rule {
  position: relative;
  display: grid;
  place-items: center;
  margin: 2px 0 -2px;
}
.split-rule::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hair-strong), transparent);
}
.split-rule span {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--hair);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  color: var(--faint);
}
.split-rule span svg { width: 13px; height: 13px; }
@media (min-width: 861px) { .split-rule { display: none; } }

/* pane footnotes */
.pane-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 0 14px 12px;
  font-size: 12px;
  color: var(--faint);
}
.empty-hint {
  display: none;
  margin: 0;
  padding: 0 16px 12px;
  font-size: 12.5px;
  color: var(--faint);
}
.is-empty .empty-hint { display: block; }
.is-empty #output { color: var(--faint); }

.hint { margin: 0; }
.kbd {
  display: inline-block;
  min-width: 1.35em;
  padding: 1px 5px;
  margin: 0 1px;
  font-family: var(--font-sans);
  font-size: .92em;
  line-height: 1.35;
  text-align: center;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--hair-strong);
  border-bottom-width: 1.5px;
  border-radius: 5px;
  white-space: nowrap;
}

.restored {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0 16px 12px;
  font-size: 12.5px;
  color: var(--muted);
  animation: noteIn .28s ease both;
}
.restored[hidden] { display: none; }
@keyframes noteIn { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
.linklike {
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
}
.linklike:hover { filter: none; text-decoration: underline; background: none; }
.linklike:active { transform: none; }

/* ============================================================
   Status bar (inside the window, under the panes)
   ============================================================ */
.statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 14px;
  padding: 11px 12px 11px 14px;
  border-radius: 12px;
  background: var(--field);
  border: 1px solid var(--hair);
  font-size: 12.5px;
}
.stats {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.005em;
  white-space: nowrap;
}
.stats::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #c4c4c9;
  transition: background-color .25s ease, box-shadow .25s ease;
}
.stats .n {
  display: inline-block;
  min-width: 1ch;
  padding: 1px 5px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid var(--hair);
  font-weight: 600;
  color: var(--text);
  text-align: center;
}
.stats .n-removed { color: var(--accent-deep); }
.stats .n-invalid { color: var(--warn); }
.stats.has-removed::before {
  background: #34c759;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, .18);
}
.stats.celebrate { animation: celebrate .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes celebrate {
  0% { transform: scale(1); }
  40% { transform: scale(1.018); }
  100% { transform: scale(1); }
}

.trust {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 10px 4px 8px;
  font-size: 12px;
  font-weight: 500;
  color: #1a7f4b;
  white-space: nowrap;
  border-radius: 999px;
  background: var(--ok-soft);
  border: 1px solid rgba(29, 156, 86, .2);
}
.trust svg { width: 13px; height: 13px; flex: none; opacity: .9; }

/* ============================================================
   Recent pastes — a quiet shelf under the window
   ============================================================ */
.recent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0 4px;
  font-size: 12.5px;
}
.recent[hidden] { display: none; }
.recent-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 2px;
}
.recent-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 17rem;
  padding: 5px 11px 5px 9px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-2);
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--hair);
  border-radius: 999px;
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, .035);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease, background-color .18s ease;
}
.chip:hover {
  filter: none;
  background: #fff;
  border-color: rgba(0, 0, 0, .16);
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .2), 0 0 0 .5px rgba(0, 0, 0, .05);
  transform: translateY(-1px);
}
.chip:active { transform: none; }
.chip .chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
}
.chip .chip-meta {
  flex: none;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  padding-left: 8px;
  border-left: 1px solid var(--hair);
}
.recent-clear {
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
}
.recent-clear:hover { color: var(--text); background: rgba(0, 0, 0, .045); filter: none; }

/* ============================================================
   Editorial "below the fold": narrow measure, magazine rhythm
   ============================================================ */
.prose {
  max-width: 40rem;
  margin: clamp(56px, 9vw, 104px) 0 0;
  color: var(--text-2);
  font-size: 1.0625rem;
  line-height: 1.62;
  letter-spacing: -.008em;
}
.prose > h2 {
  margin: clamp(40px, 6vw, 64px) 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.028em;
  color: var(--text);
}
.prose > h2:first-child { margin-top: 0; }
.prose > h2 + p, .prose > h2 + ol, .prose > h2 + ul { margin-top: 0; }
.prose h3 {
  margin: 26px 0 6px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.012em;
  color: var(--text);
}
.prose p { margin: 0 0 16px; }
.prose ol, .prose ul { margin: 0 0 18px; padding-left: 1.3em; }
.prose li { margin-bottom: 8px; padding-left: 2px; }
.prose li::marker { color: var(--faint); font-size: .9em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--text); font-style: normal; font-weight: 500; }
.prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 113, 227, .3);
  transition: border-color .15s ease;
}
.prose a:hover { border-bottom-color: var(--accent); }
.prose code {
  font-family: var(--font-mono);
  font-size: .85em;
  padding: .12em .42em;
  border-radius: 5px;
  color: var(--text);
  background: rgba(0, 0, 0, .045);
  border: 1px solid var(--hair);
  word-break: break-word;
}

/* the home page's "More ways" card grid, editorial two-up */
.links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  max-width: none;
}
.links li {
  margin: 0;
  padding: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--hair);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
.links li:hover {
  transform: translateY(-2px);
  background: #fff;
  border-color: rgba(0, 0, 0, .14);
  box-shadow: 0 12px 26px -16px rgba(23, 28, 40, .3), 0 1px 2px rgba(0, 0, 0, .04);
}
.links li::marker { content: none; }
.links a {
  display: block;
  padding: 16px 18px;
  border: 0;
  font-size: .95rem;
  line-height: 1.45;
  color: var(--muted);
  text-decoration: none;
}
.links a strong { display: block; margin-bottom: 3px; color: var(--text); font-weight: 600; }
.links a:hover { border: 0; }

/* ============================================================
   Footer
   ============================================================ */
.foot {
  margin-top: clamp(56px, 8vw, 96px);
  padding: 26px 0 44px;
  border-top: 1px solid var(--hair);
  color: var(--faint);
  font-size: 12.5px;
}
.foot p { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot .sep { color: var(--faint); opacity: .55; }

/* ============================================================
   Feedback: output pulse, copy success, toast
   ============================================================ */
.pane.pulse { animation: pulseRing .8s ease-out; }
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(0, 113, 227, .3), inset 0 1px 2px rgba(0, 0, 0, .02); }
  70% { box-shadow: 0 0 0 7px rgba(0, 113, 227, .06), inset 0 1px 2px rgba(0, 0, 0, .02); }
  100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0), inset 0 1px 2px rgba(0, 0, 0, .02); }
}

#copy .btn-label { display: inline-block; }
#copy.copied {
  background: linear-gradient(180deg, #34c759, #28a745);
  border-color: #1f8f3a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 1px 2px rgba(30, 140, 60, .25);
}
#copy.copied::after {
  content: "✓";
  display: inline-block;
  margin-left: 6px;
  animation: checkIn .3s cubic-bezier(.2, .9, .2, 1.5) both;
}
@keyframes checkIn { from { transform: scale(.3) translateY(2px); opacity: 0; } to { transform: none; opacity: 1; } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 10px 16px 10px 12px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -.005em;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  border: .5px solid rgba(0, 0, 0, .1);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 8px 24px -10px rgba(20, 24, 34, .3), 0 2px 6px rgba(0, 0, 0, .06);
  transform: translate(-50%, 16px) scale(.98);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s cubic-bezier(.2, .9, .25, 1), opacity .24s ease;
}
.toast::before {
  content: "✓";
  display: inline-grid;
  place-content: center;
  flex: none;
  width: 19px;
  height: 19px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(180deg, #34c759, #24a447);
  box-shadow: 0 1px 2px rgba(30, 140, 60, .3);
}
.toast.is-on { transform: translate(-50%, 0) scale(1); opacity: 1; }

/* ============================================================
   Utility / page variants
   ============================================================ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* long-tail pages reuse the .hero block but with a smaller display size */
.hero.is-sub h1 { font-size: clamp(2.15rem, 5vw, 3.5rem); max-width: 18ch; }

/* privacy page: a single quiet sheet */
.doc {
  max-width: 40rem;
  margin: clamp(40px, 7vw, 80px) 0 0;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--r-win);
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--hair);
  box-shadow: var(--sh-window);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.doc h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.05;
}
.doc h2 {
  margin: 30px 0 8px;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--text);
}
.doc p, .doc li { color: var(--text-2); font-size: 1rem; line-height: 1.62; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc code {
  font-family: var(--font-mono);
  font-size: .85em;
  padding: .12em .38em;
  border-radius: 5px;
  background: rgba(0, 0, 0, .05);
}
.doc a { color: var(--accent); text-decoration: none; }
.doc a:hover { text-decoration: underline; }
.doc .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  font-size: .95rem;
  font-weight: 500;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; }
  .editor.is-compare { grid-template-columns: 1fr; }
  .compare-split { display: none; }
  #mode { min-width: 7.5rem; }
  .segmented { align-items: flex-start; }
  .seg { flex-wrap: wrap; gap: 10px 14px; border-radius: 12px; }
  .split-rule { margin: 6px 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .masthead { padding: 18px 0 4px; }
  .wordmark { font-size: 19px; }
  .masthead .pages { display: none; }
  .nav {
    display: flex;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 12px;
    /* the active pill is the only thing that needs weight on a phone */
  }
  .nav a[aria-current="page"] { order: -1; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 11px; font-size: 13px; }
  .hero { padding-top: 30px; }
  .hero h1 { font-size: clamp(2.1rem, 10.5vw, 2.9rem); max-width: 12ch; letter-spacing: -.038em; }
  .hero .lead { margin-bottom: 24px; }
  .window { margin-top: 26px; border-radius: 16px; }
  .titlebar { height: 42px; padding: 0 13px; grid-template-columns: auto 1fr auto; }
  .window-title { font-size: 12.5px; justify-self: center; }
  .titlebar .title-right { display: none; }
  .window-body { padding: 12px; }
  .seg { width: 100%; font-size: 13px; }
  .seg-group { gap: 10px 14px; }
  .seg .seg-label { display: none; }
  .seg-actions { margin-left: 0; width: 100%; }
  .seg-actions button { flex: 1 1 auto; }
  textarea { min-height: 190px; font-size: 13px; }
  .pane-head { min-height: 40px; padding-left: 12px; }
  .pane .actions { gap: 6px; }
  .pane-head button { padding: 5px 9px; font-size: 12px; }
  .statusbar { font-size: 12px; padding: 10px 11px; }
  .stats { font-size: 11.5px; white-space: normal; }
  .trust { margin-left: 0; font-size: 11.5px; }
  .hint { display: none; }
  .links { grid-template-columns: 1fr; }
  .recent { padding: 0 2px; }
  .chip { max-width: 13rem; }
  .toast { bottom: 14px; font-size: 13px; padding: 8px 14px 8px 10px; }
  .prose { font-size: 1rem; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 1.95rem; }
  .lights { gap: 6px; }
  .lights i { width: 10px; height: 10px; }
}

/* hover-capable nicety only */
@media (hover: none) { .links li:hover, .chip:hover { transform: none; } }

/* ============================================================
   Reduced motion: keep every cue, drop the movement
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .ambient i { animation: none; }
  .pane.pulse { animation: none; box-shadow: 0 0 0 2px rgba(0, 113, 227, .4), inset 0 1px 2px rgba(0, 0, 0, .02); }
  .toast { transform: translate(-50%, 0); }
  .toast.is-on { opacity: 1; }
  #copy.copied::after { animation: none; }
  .stats.celebrate { animation: none; }
}
