/* Barlow and Barlow Condensed, self-hosted (SIL Open Font License: fonts/OFL-barlow.txt, fonts/OFL-barlow-condensed.txt). */
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/barlow-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/barlow-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-condensed-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-condensed-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-condensed-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-condensed-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Palette sampled from a photographer's colour-checker chart. */
:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);

  --paper: #F3F3F2;
  --surface: #FFFFFF;
  --ink: #343434;
  --graphite: #555555;
  --field-line: #7A7A79;
  --silver: #C8C8C8;
  --hair: #DCDCDA;
  --lock: #383D96;
  --btn: #383D96;
  --btn-ink: #FFFFFF;
  --wash: rgba(56, 61, 150, 0.08);
  --error: #AF363C;
  --toast-bg: #343434;
  --toast-ink: #F3F3F2;
  --scrim: rgba(243, 243, 242, 0.94);
  --backdrop: rgba(52, 52, 52, 0.42);
  --lift: 0 -12px 40px rgba(52, 52, 52, 0.16);

  --font: "Barlow", "DIN Alternate", "Bahnschrift", "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-cond: "Barlow Condensed", "DIN Condensed", "Bahnschrift Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --action-h: 81px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #343434;
    --surface: #3E3E3E;
    --ink: #F3F3F2;
    --graphite: #C8C8C8;
    --field-line: #A0A0A0;
    --silver: #7A7A79;
    --hair: #484848;
    --lock: #8580B1;
    --btn: #505BA6;
    --btn-ink: #FFFFFF;
    --wash: rgba(133, 128, 177, 0.16);
    --error: #F2A2A7;
    --toast-bg: #F3F3F2;
    --toast-ink: #343434;
    --scrim: rgba(52, 52, 52, 0.94);
    --backdrop: rgba(0, 0, 0, 0.5);
    --lift: 0 -12px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #343434;
  --surface: #3E3E3E;
  --ink: #F3F3F2;
  --graphite: #C8C8C8;
  --field-line: #A0A0A0;
  --silver: #7A7A79;
  --hair: #484848;
  --lock: #8580B1;
  --btn: #505BA6;
  --btn-ink: #FFFFFF;
  --wash: rgba(133, 128, 177, 0.16);
  --error: #F2A2A7;
  --toast-bg: #F3F3F2;
  --toast-ink: #343434;
  --scrim: rgba(52, 52, 52, 0.94);
  --backdrop: rgba(0, 0, 0, 0.5);
  --lift: 0 -12px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: inherit; }
[hidden] { display: none !important; }
html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { touch-action: manipulation; }
:focus-visible { outline: 2.5px solid var(--lock); outline-offset: 2px; }
.offscreen {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 0 20px calc(var(--action-h) + 28px); }

.brand { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 16px 0 12px; }
.brand-tag { margin: 0 0 0 auto; font-size: 14px; color: var(--graphite); }
.brand svg { display: block; flex: none; }
.brand h1 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.2; }

/* Viewfinder: the brackets snap tight when there's something to search */
.viewfinder {
  position: relative;
  min-height: 236px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.corner {
  position: absolute;
  width: var(--c-size, 28px);
  height: var(--c-size, 28px);
  border: 0 solid var(--c-color, var(--silver));
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.18s ease;
}
.corner.tl { top: 0; left: 0; border-top-width: var(--c-w, 3px); border-left-width: var(--c-w, 3px); }
.corner.tr { top: 0; right: 0; border-top-width: var(--c-w, 3px); border-right-width: var(--c-w, 3px); }
.corner.bl { bottom: 0; left: 0; border-bottom-width: var(--c-w, 3px); border-left-width: var(--c-w, 3px); }
.corner.br { bottom: 0; right: 0; border-bottom-width: var(--c-w, 3px); border-right-width: var(--c-w, 3px); }
.viewfinder.is-locked { --c-color: var(--lock); }
.viewfinder.is-locked .corner.tl { transform: translate(8px, 8px); }
.viewfinder.is-locked .corner.tr { transform: translate(-8px, 8px); }
.viewfinder.is-locked .corner.bl { transform: translate(8px, -8px); }
.viewfinder.is-locked .corner.br { transform: translate(-8px, -8px); }

.vf-empty { display: flex; flex-direction: column; align-items: flex-start; }
.headline {
  margin: 0;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: clamp(2.5rem, 8.5vw + 0.5rem, 3.75rem);
  line-height: 0.95;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.choose {
  margin-top: 22px;
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 18px 0 14px;
  border: 0; border-radius: 10px;
  background: var(--ink); color: var(--paper);
  font-size: 17px; font-weight: 600;
  cursor: pointer;
}
.choose svg { width: 22px; height: 22px; flex: none; }
.vf-note { margin: 12px 0 0; font-size: 15px; color: var(--graphite); }
.for-mouse { display: none; }
@media (hover: hover) and (pointer: fine) {
  .for-mouse { display: inline; }
  .for-touch { display: none; }
}
.vf-photo { margin: 0; min-height: 176px; display: flex; align-items: center; justify-content: center; }
.vf-photo img { display: block; max-width: 100%; max-height: 300px; border-radius: 3px; }
.vf-photo p { margin: 0; font-size: 15px; color: var(--graphite); }
.vf-link { min-width: 0; }
.link-host {
  margin: 0;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: clamp(1.875rem, 6vw + 0.5rem, 2.625rem);
  line-height: 1;
  overflow-wrap: anywhere;
}
.link-file { margin: 10px 0 0; font-size: 16px; color: var(--graphite); overflow-wrap: anywhere; }

/* Search bar */
.bar {
  margin-top: 18px;
  display: flex; align-items: center; gap: 2px;
  min-height: 60px; padding: 6px;
  background: var(--surface);
  border: 1.5px solid var(--field-line);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bar:focus-within { border-color: var(--lock); box-shadow: 0 0 0 3px var(--wash); }
.bar.is-nudged { animation: nudge 0.34s ease; }
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}
.bar-btn {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 46px; padding: 0 10px;
  border: 0; border-radius: 8px;
  background: transparent;
  font-size: 16px; font-weight: 500;
  cursor: pointer;
}
.bar-btn svg { width: 24px; height: 24px; }
.bar-btn:focus-visible { outline-offset: -2px; }
.paste-btn { color: var(--lock); font-weight: 600; }
.bar-field { flex: 1; min-width: 0; display: flex; align-items: center; }
.bar-input {
  width: 100%; height: 46px; padding: 0 6px;
  border: 0; outline: 0; background: transparent;
  font-size: 17px;
}
.bar-input::placeholder { color: var(--graphite); opacity: 1; }
.bar-photo { min-width: 0; padding: 0 6px; display: flex; flex-direction: column; line-height: 1.25; }
.bar-photo-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-photo-meta { font-size: 14px; color: var(--graphite); }
.hint { margin: 10px 2px 0; font-size: 14.5px; line-height: 1.4; color: var(--graphite); }
.hint.is-error { color: var(--error); }

/* Site picker */
.sites { margin-top: 36px; }
.sites-head { display: flex; align-items: baseline; gap: 4px; }
.sites-head h2 { margin: 0 auto 0 0; font-family: var(--font-cond); font-weight: 700; font-size: 28px; line-height: 1; }
.text-btn { padding: 8px 6px; border: 0; background: none; color: var(--lock); font-size: 15px; font-weight: 500; cursor: pointer; }
.group-title { margin: 22px 0 8px; font-size: 14px; font-weight: 500; color: var(--graphite); }
.engine-group { border-top: 1px solid var(--hair); }
.engine {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  width: 100%; min-height: 64px;
  padding: 10px 4px;
  border: 0; border-bottom: 1px solid var(--hair);
  background: none;
  text-align: left;
  cursor: pointer;
}
.engine:active { background: var(--wash); }
.engine:focus-visible { outline-offset: -2px; border-radius: 6px; }
.patch {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 2px solid var(--patch);
  border-radius: 5px;
  transition: background-color 0.12s ease;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .patch { border-color: color-mix(in srgb, var(--patch) 72%, var(--ink)); }
}
.patch svg {
  width: 16px; height: 16px;
  fill: none; stroke: var(--patch-check); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0;
}
.engine.is-on .patch { background: var(--patch); border-color: var(--patch); }
.engine.is-on .patch svg { opacity: 1; }
.engine-name { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; }
.engine-desc { display: block; margin-top: 2px; font-size: 14.5px; line-height: 1.3; color: var(--graphite); }
.engine-tag { font-size: 13.5px; color: var(--graphite); white-space: nowrap; }
.engine.is-blocked { cursor: not-allowed; }
.engine.is-blocked .patch, .engine.is-blocked .engine-text { opacity: 0.45; }
.sites-note { margin: 12px 2px 0; font-size: 14.5px; color: var(--graphite); }

/* About and questions: useful to visitors, and the text search engines index */
.about { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--hair); }
.about h2 { margin: 32px 0 10px; font-family: var(--font-cond); font-weight: 700; font-size: 26px; line-height: 1.05; }
.about h2:first-child { margin-top: 0; }
.about p { margin: 0 0 12px; max-width: 62ch; }
.steps { margin: 0; padding-left: 1.4em; max-width: 62ch; }
.steps li { margin: 0 0 8px; padding-left: 4px; }
.steps li::marker { font-family: var(--font-cond); font-weight: 700; color: var(--lock); }
.faq h3 { margin: 20px 0 4px; font-size: 17px; font-weight: 600; line-height: 1.3; }
.faq p { color: var(--graphite); }

@media (hover: hover) {
  .engine:hover, .bar-btn:hover { background: var(--wash); }
  .text-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* Pinned search button */
.action {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  border-top: 1px solid var(--hair);
}
.action-inner { max-width: 520px; margin: 0 auto; }
.go {
  display: block; width: 100%; height: 56px; padding: 0 16px;
  border: 0; border-radius: 14px;
  background: var(--btn); color: var(--btn-ink);
  font-family: var(--font-cond); font-weight: 700; font-size: 22px; letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.go:disabled { opacity: 0.6; cursor: progress; }
.go:focus-visible { outline-offset: 3px; }

/* Toast */
.toast {
  position: fixed; z-index: 25;
  left: 16px; right: 16px;
  bottom: calc(var(--action-h) + 12px + env(safe-area-inset-bottom, 0px));
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px 12px 16px;
  border-radius: 10px;
  background: var(--toast-bg); color: var(--toast-ink);
  font-size: 15px; line-height: 1.35;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  visibility: hidden; opacity: 0; transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}
.toast.is-on { visibility: visible; opacity: 1; transform: none; transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s; }
.toast-text { flex: 1; min-width: 0; }
.toast-slot { flex: none; }
.toast-action {
  display: inline-block; padding: 8px 4px;
  border: 0; background: none; color: inherit;
  font-size: 15px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
  white-space: nowrap; cursor: pointer;
}

/* Sheet for opening several sites */
.backdrop { position: fixed; inset: 0; z-index: 30; background: var(--backdrop); opacity: 0; transition: opacity 0.2s ease; }
.backdrop.is-open { opacity: 1; }
.sheet {
  position: fixed; z-index: 31; left: 0; right: 0; bottom: 0;
  max-width: 560px; max-height: 88vh; margin: 0 auto;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--lift);
  transform: translateY(105%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet.is-open { transform: none; }
.grip { width: 40px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: var(--silver); }
.sheet h2 { margin: 0; font-family: var(--font-cond); font-weight: 700; font-size: 28px; line-height: 1.05; }
.sheet-note { margin: 6px 0 10px; font-size: 15px; color: var(--graphite); }
.sheet-list { margin: 0; padding: 0; list-style: none; }
.sheet-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
  min-height: 66px; padding: 8px 0;
  border-bottom: 1px solid var(--hair);
}
.sheet-row .patch { width: 22px; height: 22px; border: 0; border-radius: 4px; background: var(--patch); }
.sheet-name { font-size: 17px; font-weight: 600; line-height: 1.25; }
.sheet-state { display: block; font-size: 13.5px; font-weight: 400; color: var(--graphite); }
.open {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 112px; height: 44px; padding: 0 16px;
  border: 0; border-radius: 10px;
  background: var(--btn); color: var(--btn-ink);
  font-family: var(--font-cond); font-weight: 700; font-size: 19px;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.sheet-row.is-opened .open { background: transparent; color: var(--lock); box-shadow: inset 0 0 0 1.5px var(--field-line); }
.sheet-skip { margin: 12px 0 0; font-size: 14.5px; color: var(--graphite); }
.sheet-done {
  display: block; width: 100%; height: 52px; margin-top: 16px;
  border: 0; border-radius: 12px;
  background: var(--paper);
  font-size: 17px; font-weight: 600; cursor: pointer;
}

/* Drag and drop (desktop) */
.dropzone {
  --c-color: var(--lock); --c-size: 56px; --c-w: 4px;
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center; padding: 24px;
  background: var(--scrim);
  opacity: 0; transition: opacity 0.15s ease;
  pointer-events: none;
}
.dropzone.is-on { opacity: 1; }
.dropzone-frame { position: absolute; inset: 24px; }
.dropzone p { margin: 0; font-family: var(--font-cond); font-weight: 700; font-size: clamp(2rem, 5vw, 3rem); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .corner, .bar, .toast, .sheet, .backdrop, .dropzone { transition: none !important; }
  .bar.is-nudged { animation: none; }
}
