@font-face {
  font-family: "Bricolage";
  src: url("/static/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f5f1ea;
  --paper-2: #ebe5da;
  --ink: #1f1a14;
  --ink-2: #5b5246;
  --line: #d6cdbf;
  --accent: #c2431b;
  --accent-ink: #fff8f2;
  --accent-soft: #f7dccf;
  --focus: #1f6feb;
  --radius: 14px;
  --measure: 42rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16130f;
    --paper-2: #221d17;
    --ink: #f1ebe2;
    --ink-2: #b3a899;
    --line: #3a3229;
    --accent: #f06a3c;
    --accent-ink: #1b0e07;
    --accent-soft: #3a2118;
    --focus: #7fb0ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Bricolage", ui-sans-serif, system-ui, sans-serif;
  font-optical-sizing: auto;
}
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1em; }
code, kbd { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 5px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 1; }

/* frame */
.top, main, .foot { width: min(100% - 2rem, var(--measure)); margin-inline: auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 750; font-size: 1.2rem; letter-spacing: -0.03em; text-decoration: none; }
.brand svg { width: 1.6rem; height: 1.6rem; color: var(--accent); }
.top nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.top nav a { text-decoration: none; color: var(--ink-2); padding-block: 0.6rem; }
.top nav a:hover { color: var(--ink); }

/* hero + form */
.hero { max-width: var(--measure); padding-block: clamp(2rem, 7vw, 5rem) 3rem; }
.eyebrow { margin: 0 0 0.75rem; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(2.4rem, 7.5vw, 4.25rem); font-weight: 780; letter-spacing: -0.045em; text-wrap: balance; }
.lede { font-size: 1.2rem; color: var(--ink-2); margin-block: 1rem 2rem; max-width: 34rem; text-wrap: pretty; }
.grab { display: grid; gap: 0.75rem; }
.field { position: relative; display: flex; }
input[type=url], input[type=text], textarea {
  width: 100%; min-height: 3.5rem; padding: 0.9rem 1rem; font: inherit; font-size: 1.05rem;
  color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
}
textarea { min-height: 7.5rem; resize: vertical; font: 0.85rem/1.4 ui-monospace, monospace; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[readonly] { background: var(--paper-2); color: var(--ink-2); }
.field .paste, .field .copy {
  position: absolute; right: 0.5rem; top: 50%; translate: 0 -50%;
  min-height: 2.6rem; padding: 0 1rem; font: 600 0.95rem "Bricolage", sans-serif;
  color: var(--ink); background: var(--paper-2); border: 0; border-radius: 10px; cursor: pointer;
}
.field:has(.paste:not([hidden])) input, .field:has(.copy:not([hidden])) input { padding-right: 6rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.5rem; padding: 0 1.5rem; font: 700 1.1rem "Bricolage", sans-serif; letter-spacing: -0.01em;
  color: var(--accent-ink); background: var(--accent); border: 2px solid var(--accent); border-radius: var(--radius);
  text-decoration: none; cursor: pointer; transition: transform 0.12s ease-out, background-color 0.12s;
}
.btn:hover { color: var(--accent-ink); filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn small { font-weight: 500; opacity: 0.8; font-size: 0.85rem; }
.btn-ghost { color: var(--ink); background: transparent; border-color: var(--ink); }
.btn-ghost:hover { color: var(--ink); background: var(--paper-2); filter: none; }
.btn[aria-busy=true] { opacity: 0.75; cursor: progress; }
.btn[aria-busy=true]::before {
  content: ""; width: 1rem; height: 1rem; border: 2.5px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { rotate: 1turn; } }
@media (min-width: 40rem) {
  .grab:has(> .field) { grid-template-columns: 1fr auto; }
  .grab:has(> .field) .btn-go { min-width: 9.5rem; }
}
.aside { margin-top: 1.25rem; color: var(--ink-2); font-size: 0.95rem; }

/* result */
.alert { margin-top: 1.5rem; padding: 1rem 1.25rem; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 4px var(--radius) var(--radius) 4px; }
.alert p:last-child { margin: 0; }
.alert:focus { outline: none; }
.alert .btn-ghost { min-height: 2.75rem; font-size: 1rem; }
.result { margin-top: 2rem; display: grid; gap: 1.25rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.result:focus { outline: none; }
.thumb { width: 100%; max-width: 20rem; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--paper-2); }
.result h2 { font-size: 1.35rem; font-weight: 650; overflow-wrap: anywhere; }
.meta { color: var(--ink-2); margin-block: 0.4rem 1rem; font-size: 0.95rem; }
.links { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.6rem; }
.links .btn { width: 100%; }
@media (min-width: 40rem) { .links { display: flex; flex-wrap: wrap; } .links .btn { width: auto; } }
.hint { color: var(--ink-2); font-size: 0.9rem; }
@media (min-width: 40rem) { .result:has(.thumb) { grid-template-columns: 12rem 1fr; } }

/* steps, faq */
.steps, .faq, .more { max-width: var(--measure); padding-block: 2.5rem; border-top: 1px solid var(--line); }
.steps h2, .faq h2, .more h2, .prose h2 { font-size: 1.6rem; font-weight: 720; margin-bottom: 1.25rem; }
.steps ol { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 1.5rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 0.75rem; }
.steps li::before { content: counter(s); grid-row: span 2; font-size: 2rem; font-weight: 780; line-height: 1; color: var(--accent); }
.steps h3 { font-size: 1.15rem; font-weight: 680; margin-bottom: 0.3rem; }
.steps p { margin: 0; color: var(--ink-2); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding-block: 1rem; font-weight: 620; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-weight: 700; font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--ink-2); }

/* private wizard */
.wizard { list-style: none; padding: 0; margin: 0; display: grid; gap: 2rem; }
.wizard h2 { font-size: 1.2rem; font-weight: 680; display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.wizard .n { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 1rem; }
.wizard p { color: var(--ink-2); }
.wizard .hint { margin-top: 0.5rem; }

.bookmarklet { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.bookmarklet h2 { font-size: 1.2rem; font-weight: 680; margin-bottom: 0.75rem; }
.bookmarklet p { color: var(--ink-2); }
#bm-link { cursor: grab; }
.note { padding: 0.75rem 1rem; background: var(--accent-soft); border-radius: 10px; color: var(--ink); margin: 0; }

/* text pages */
.prose { max-width: var(--measure); padding-block: clamp(2rem, 6vw, 4rem); }
.prose h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 760; margin-bottom: 1.5rem; text-wrap: balance; }
.prose h2 { margin-top: 2.25rem; margin-bottom: 0.75rem; font-size: 1.35rem; }
.prose li { margin-bottom: 0.5rem; }
.more h3 { font-size: 1.15rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.more li { margin-bottom: 0.4rem; }

/* footer */
.foot { padding-block: 2.5rem 3rem; border-top: 2px solid var(--ink); color: var(--ink-2); font-size: 0.92rem; display: grid; gap: 1rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.foot nav span { color: var(--ink); font-weight: 650; }
.foot nav a { text-decoration: none; padding-block: 0.35rem; }
.foot nav a:hover { text-decoration: underline; }
.foot p { margin: 0; max-width: var(--measure); }

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

/* Paste panel (_grab.html): site icons, detection line. Home page: private card, site list. */
.ico { width: 1.75rem; height: 1.75rem; flex: none; }
.panel { padding: 1rem; border: 2px solid var(--ink); border-radius: calc(var(--radius) + 6px); background: var(--paper); }
.panel input { border-width: 1.5px; border-color: var(--ink-2); }
.panel > :not(.field):not(.btn-go) { grid-column: 1 / -1; }
.panel .lbl { font-weight: 680; font-size: 1.05rem; margin-bottom: -0.25rem; }
.lamps { list-style: none; padding: 0; margin: 0 0 0.15rem; min-width: 0; display: flex; justify-content: space-between; gap: 0.15rem; }
@media (min-width: 40rem) { .lamps { justify-content: flex-start; gap: 1rem; } }
.lamps li { display: grid; place-items: center; flex: 0 1 1.9rem; min-width: 0; height: 1.9rem; color: var(--ink-2); transition: opacity 0.15s, color 0.15s, transform 0.15s; }
.lamps .ico { width: min(1.45rem, 100%); height: 1.45rem; }
.lamps.on li { opacity: 0.28; }
.lamps.on li.lit { opacity: 1; color: var(--accent); transform: scale(1.18); }
.detect { margin: 0; min-height: 1.6rem; display: flex; align-items: flex-start; gap: 0.45rem; font-size: 0.95rem; line-height: 1.45; color: var(--ink-2); }
.detect svg { width: 1.2rem; height: 1.2rem; flex: none; margin-top: 0.1rem; }
.detect[data-state] { color: var(--ink); }
.detect[data-state=ok] svg { color: var(--accent); }
.tool h1 { font-size: clamp(2rem, 7vw, 3.6rem); margin-bottom: 1.25rem; }
.hero.tool { padding-top: clamp(1.25rem, 5vw, 4rem); }
.lede + .panel { margin-top: -0.75rem; }
.door { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.9rem; margin-top: 1rem; padding: 0.85rem 1rem; min-height: 4rem;
  border: 1px solid transparent; border-radius: calc(var(--radius) + 6px); background: var(--accent-soft); color: var(--ink); text-decoration: none; font-size: 0.95rem; line-height: 1.35; }
.door b { display: block; font-weight: 700; font-size: 1.02rem; }
.door .tile { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--paper); color: var(--accent); }
.door .ico { width: 1.4rem; height: 1.4rem; }
.door .chev { width: 1.25rem; height: 1.25rem; color: var(--accent); transition: transform 0.15s; }
.door:hover { color: var(--ink); border-color: var(--accent); }
.door:hover .chev { transform: translateX(3px); }
.trust { margin: 1rem 0 0; color: var(--ink-2); font-size: 0.95rem; }
.dir { max-width: var(--measure); padding-block: 2.5rem; border-top: 1px solid var(--line); }
.dir h2 { font-size: 1.6rem; font-weight: 720; margin-bottom: 1.25rem; }
.rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
@media (min-width: 40rem) { .rows { grid-template-columns: 1fr 1fr; } }
.rows a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.85rem; min-height: 4rem; height: 100%; padding: 0.7rem 0.85rem;
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; line-height: 1.3; }
.rows a:hover { color: var(--ink); border-color: var(--ink); background: var(--paper-2); }
.rows b { display: block; font-weight: 680; }
.rows small { display: block; color: var(--ink-2); font-size: 0.85rem; margin-top: 0.15rem; }
.rows .tile { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--paper-2); }
.rows .tile .ico { width: 1.45rem; height: 1.45rem; }
.rows .chev { width: 1.1rem; height: 1.1rem; color: var(--ink-2); }
@media (min-width: 40rem) { .tool + .steps ol { grid-template-columns: repeat(3, 1fr); } }
