:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --ink: #1c1b1a;
  --muted: #6b665f;
  --line: #e3ddd3;
  --red: #b40101;
  --red-ink: #8f0101;
  --claude: #c96442;
  --chatgpt: #0f7b5f;
  --gemini: #3b5bdb;
  --font-display: "Cabinet Grotesk", "Satoshi", system-ui, sans-serif;
  --font-body: "Satoshi", system-ui, sans-serif;
  --r: 14px;
  --shadow: 0 1px 2px rgba(28,27,26,.04), 0 8px 24px rgba(28,27,26,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.measure { position: absolute; visibility: hidden; white-space: nowrap; left: -9999px; top: 0; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(247,244,239,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; flex-direction: column; text-decoration: none; white-space: nowrap; line-height: 1.05; }
.brand-main { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -.01em; }
.brand-by { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.brand-kw { color: var(--red); }
.top-nav { white-space: nowrap; display: flex; align-items: center; gap: 20px; font-size: 14px; }
.top-nav a { text-decoration: none; color: var(--muted); }
.top-nav a:hover { color: var(--ink); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-left: 4px; vertical-align: middle; }

/* hero */
.hero { padding: clamp(48px, 9vw, 112px) 0 32px; }
.eyebrow { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--red); font-weight: 700; margin: 0 0 18px; }
.sentence { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 5.6vw, 68px); line-height: 1.18; letter-spacing: -.02em; margin: 0; max-width: 1100px; }
.pick { display: inline-block; position: relative; }
.pick select {
  appearance: none; -webkit-appearance: none; font: inherit; letter-spacing: inherit; color: var(--red);
  background: transparent; border: 0; border-bottom: 4px solid var(--red); border-radius: 0;
  padding: 0 40px 2px 2px; margin: 0 2px; cursor: pointer; max-width: 92vw;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b40101' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center; background-size: .5em;
}
.pick select:focus-visible { outline: 3px solid rgba(180,1,1,.25); outline-offset: 4px; }
.pick select option { font-family: var(--font-body); font-size: 16px; color: var(--ink); }
.addr-row { margin-top: 40px; max-width: 640px; transition: opacity .2s; }
.addr-row.dim { opacity: .45; }
.addr-row label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.addr-row input { width: 100%; font: inherit; font-size: 18px; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); }
.addr-row input:focus { outline: none; border-color: var(--ink); }
.hint { color: var(--muted); font-size: 15px; margin: 12px 0 0; max-width: 640px; }

/* results */
.results { padding: 24px 0 48px; }
.results-head h2, .library h2 { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin: 0 0 18px; letter-spacing: -.01em; }
.sub { font-size: 18px; margin: 36px 0 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: #cfc7ba; }
#matchCards .card { border: 2px solid var(--ink); }
.card h3 { margin: 4px 0 0; font-size: 20px; line-height: 1.25; }
.card p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.btn-card { margin-top: 4px; border: 0; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; font-weight: 700; font-size: 15px; }
.btn-card:hover { background: var(--red); }
.empty { grid-column: 1 / -1; background: var(--surface); border: 1px dashed #cfc7ba; border-radius: var(--r); padding: 20px; color: var(--muted); }
.empty p { margin: 0; }

.tool-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; color: #fff; background: var(--ink); letter-spacing: .01em; }
.t-claude { background: var(--claude); }
.t-chatgpt { background: var(--chatgpt); }
.t-gemini { background: var(--gemini); }

/* how */
.how { padding: 40px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.how h3 { margin: 8px 0 6px; font-size: 18px; }
.how p { margin: 0; color: var(--muted); font-size: 15px; }
.num { font-family: var(--font-display); font-weight: 800; color: var(--red); font-size: 28px; }

/* library */
.library { padding: 56px 0 72px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 99px; font-size: 14px; color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 13px; }
.foot p { margin: 0; max-width: 820px; }

/* drawers */
.scrim { position: fixed; inset: 0; background: rgba(28,27,26,.4); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(640px, 100%); background: var(--surface); z-index: 50; transform: translateX(105%); transition: transform .28s cubic-bezier(.16,1,.3,1); overflow-y: auto; visibility: hidden; transition: transform .28s cubic-bezier(.16,1,.3,1), visibility 0s linear .28s; }
.drawer.open { transform: none; visibility: visible; box-shadow: -20px 0 60px rgba(0,0,0,.12); transition: transform .28s cubic-bezier(.16,1,.3,1); }
.drawer-in { padding: 28px 28px 40px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.drawer h2 { font-family: var(--font-display); font-size: 28px; margin: 0; letter-spacing: -.01em; line-height: 1.15; padding-right: 40px; }
.x { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 24px; line-height: 1; }
.d-get { margin: 0; color: var(--ink); }
.d-why { margin: 0; color: var(--muted); font-size: 14px; }
.d-warn { background: #fff5e6; border: 1px solid #f1d6a6; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.link { border: 0; background: none; color: var(--red); font-weight: 700; padding: 0; text-decoration: underline; }
.check { display: flex; gap: 10px; align-items: flex-start; background: #fbeaea; border: 1px solid #efc4c4; border-radius: 10px; padding: 12px 14px; font-size: 14px; cursor: pointer; }
.check[hidden] { display: none; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex: none; }
.d-label { font-size: 13px; font-weight: 700; margin-top: 4px; }
#dText { width: 100%; min-height: 300px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 13px; line-height: 1.5; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf8; color: var(--ink); resize: vertical; }
.d-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; border: 0; background: var(--red); color: #fff; padding: 14px 20px; border-radius: 10px; font-weight: 700; text-decoration: none; font-size: 16px; }
.btn-primary:hover { background: var(--red-ink); }
.btn-primary.disabled { background: #c9c3ba; cursor: not-allowed; }
.btn-ghost { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.d-actions .btn-ghost { padding: 13px 18px; font-size: 16px; }
.d-note { margin: 0; font-size: 13px; color: var(--muted); }

.pform { display: flex; flex-direction: column; gap: 14px; }
.pform label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.pform input, .pform textarea { font: inherit; font-size: 15px; font-weight: 400; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf8; color: var(--ink); }
.pform .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 60; box-shadow: var(--shadow); }

@media (max-width: 720px) {
  .top-nav a[href="#library"] { display: none; }
  .top-nav { gap: 12px; }
  .brand-main { font-size: 18px; }
  .brand-by { font-size: 10px; }
  .top-nav .btn-ghost { padding: 8px 12px; font-size: 13px; }
  .sentence { font-size: 34px; }
  .pick select { border-bottom-width: 3px; padding-right: 30px; }
  .how-grid { grid-template-columns: 1fr; gap: 20px; }
  .pform .two { grid-template-columns: 1fr; }
  .drawer-in { padding: 22px 18px 32px; }
}
