* { box-sizing: border-box; }
body { margin: 0; font-family: "Inter", system-ui, sans-serif; color: #1a1a1a; background: #f0f1f4; }
.topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid #e4e6eb;
  padding: 0.8rem 1.25rem; display: flex; align-items: center; gap: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.brand { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand small { display: block; font-weight: 500; font-size: .7rem; color: #888; }
.hint { font-size: .8rem; color: #667; max-width: 70ch; line-height: 1.4; }
.hint b { color: #1a1a1a; }

.shell { display: grid; grid-template-columns: 230px 1fr; align-items: start; }
.sidebar { position: sticky; top: 61px; padding: 1.25rem .85rem; height: calc(100vh - 61px); overflow: auto; }
.sidebar h4 { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #999; margin: 0 0 .5rem .5rem; }
.ext { display: block; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer;
  padding: .5rem .6rem; border-radius: 8px; margin-bottom: 3px; }
.ext:hover { background: #e7e9ef; }
.ext.active { background: #1a1a1a; color: #fff; }
.ext .u { font-weight: 600; font-size: .85rem; word-break: break-all; }
.ext .d { font-size: .68rem; opacity: .6; }
.add { font-size: .72rem; color: #999; margin: 1rem .5rem; line-height: 1.5; }
.add code { background: #e7e9ef; padding: .1rem .3rem; border-radius: 4px; }

.main { padding: 1.5rem; min-height: calc(100vh - 61px); }
.empty { color: #999; text-align: center; padding: 4rem; }
.dhead { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.dhead h1 { font-size: 1.3rem; margin: 0; }
.dhead a { font-size: .85rem; }
.dhead .meta { font-size: .75rem; color: #888; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid #e4e6eb; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.04); margin-bottom: 1.25rem; }
.panel > h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #667;
  margin: 0; padding: .8rem 1.1rem; border-bottom: 1px solid #eef0f3; display:flex; justify-content:space-between; align-items:center; }
.panel .body { padding: 1.1rem; }
.panel iframe { width: 100%; border: 0; display: block; background: #fff; }

.swatches { display: flex; flex-wrap: wrap; gap: .6rem; }
.sw { width: 84px; }
.sw .chip { height: 48px; border-radius: 8px; border: 1px solid rgba(0,0,0,.1); }
.sw .lab { font-size: .66rem; font-family: ui-monospace, monospace; margin-top: .3rem; word-break: break-all; }
.sw .role { font-size: .66rem; color: #888; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; font-size: .85rem; margin-top: .6rem; }
.kv dt { color: #888; }
.kv dd { margin: 0; font-weight: 600; font-family: ui-monospace, monospace; }
.kv .null { color: #c00; font-weight: 600; opacity: .7; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips span { background: #eef0f3; border-radius: 6px; padding: .2rem .5rem; font-size: .72rem; font-family: ui-monospace, monospace; }
.shadowsamp { font-size: .68rem; font-family: ui-monospace, monospace; color: #555; background: #f7f8fa; border-radius: 6px; padding: .35rem .5rem; margin-bottom: .3rem; word-break: break-all; }

.gapmap { list-style: none; margin: 0; padding: 0; }
.gapmap li { display: flex; justify-content: space-between; align-items: center; padding: .45rem .2rem; border-bottom: 1px solid #f0f1f4; font-size: .9rem; }
.gapmap li:last-child { border-bottom: 0; }
.tag { font-size: .68rem; font-weight: 700; padding: .15rem .5rem; border-radius: 6px; }
.tag.observed { background: #e6f4ea; color: #1e7a3e; }
.tag.GAP { background: #fdeaea; color: #b3261e; }
.tag.deflt { background: #fff4e0; color: #8a6d1a; }

.note { font-size: .75rem; color: #888; line-height: 1.5; margin-top: .6rem; }
.copy { font-size: .7rem; border: 1px solid #d6d9e0; background: #fafbfc; border-radius: 6px; padding: .2rem .5rem; cursor: pointer; }
.copy:hover { border-color: #888; }
.frameblock { font-size: .75rem; color: #888; padding: 1.1rem; }

/* Proposals zone — visually distinct from the factual capture above */
.panel--proposals { margin-top: 1.5rem; border: 1px solid #d9c8f0; background: #faf7ff; }
.panel--proposals > h2 { background: #f1e9ff; color: #5b3fa6; border-bottom-color: #e6daf8; }
.proposal-disclaimer { font-size: .8rem; color: #6a5a86; background: #f3ecff; border: 1px dashed #cbb6ee; border-radius: 8px; padding: .7rem .9rem; margin: 0 0 1rem; line-height: 1.5; }
.proposal-disclaimer b { color: #4a2f86; }
.psummary { font-size: .98rem; line-height: 1.55; margin: 0 0 1.2rem; color: #2a2233; }
.obs { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.ob { background: #fff; border: 1px solid #e7dcf6; border-radius: 12px; padding: .9rem 1rem; }
.ob h4 { margin: 0 0 .4rem; font-size: .95rem; color: #2a2233; }
.ob__seen { font-size: .85rem; color: #555; margin: 0 0 .5rem; line-height: 1.5; }
.ob__prop { font-size: .88rem; color: #3c2f57; margin: 0; line-height: 1.5; }
.lbl, .ptag { display: inline-block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .12rem .45rem; border-radius: 5px; margin-right: .4rem; vertical-align: middle; }
.lbl { background: #eef0f3; color: #777; }
.ptag { background: #6b3fd1; color: #fff; }
.unreviewed { font-size: .9rem; color: #6a5a86; background: #fff; border: 1px dashed #cbb6ee; border-radius: 10px; padding: 1.2rem; text-align: center; }

.showcase-links { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .6rem; padding: 1rem 1.1rem .2rem; }
.sc-link { display: block; text-decoration: none; border-radius: 10px; padding: .8rem .9rem; border: 1px solid; transition: transform .12s; }
.sc-link:hover { transform: translateY(-2px); }
.sc-link b { display: block; font-size: .92rem; }
.sc-link span { display: block; font-size: .72rem; opacity: .8; margin-top: .2rem; line-height: 1.4; }
.sc-link--a { background: #eef3ff; border-color: #cdddf7; color: #1f3f80; }
.sc-link--b { background: #faf7ff; border-color: #d9c8f0; color: #5b3fa6; }
.sc-link--c { background: #f4efff; border-color: #cdb8f2; color: #6d3fc4; }
@media (max-width: 560px) { .showcase-links { grid-template-columns: 1fr; } }

/* extractor + grid (main page) */
.extractor { padding: 1.5rem 1.5rem 0; }
.urlform { display: flex; gap: .6rem; max-width: 720px; }
.urlform input { flex: 1; padding: .7rem .9rem; font-size: .95rem; border: 1px solid #d6d9e0; border-radius: 10px; background: #fff; }
.urlform input:focus { outline: none; border-color: #888; }
.urlform button { border: 0; background: #1a1a1a; color: #fff; font-weight: 600; font-size: .9rem; padding: 0 1.1rem; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.urlform button:hover { background: #333; }
.err { color: #b3261e; background: #fdeaea; border-radius: 8px; padding: .6rem .8rem; margin-top: .7rem; font-size: .85rem; max-width: 720px; }
.sub { font-size: .8rem; color: #888; margin: .8rem 0 0; }
.okbar { background: #e6f4ea; color: #1e7a3e; border-radius: 8px; padding: .6rem .9rem; margin-bottom: 1rem; font-size: .85rem; }
.filterbar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: 1.25rem 1.5rem .5rem; }
.filterbar .search { padding: .5rem .8rem; font-size: .9rem; border: 1px solid #d6d9e0; border-radius: 8px; background: #fff; min-width: 220px; }
.seg-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: #999; font-weight: 700; margin-right: .2rem; }
.fchip { border: 1px solid #d6d9e0; background: #fff; border-radius: 999px; padding: .25rem .7rem; font-size: .78rem; cursor: pointer; color: #555; }
.fchip:hover { border-color: #888; }
.fchip.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; padding: 1rem 1.5rem 2rem; }
.post-wrap { position: relative; display: flex; flex-direction: column; }
.post { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid #e4e6eb; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.04); transition: transform .15s, box-shadow .15s; }
.post:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.10); }
/* ★ favourite toggle — overlaid top-right, outside the <a> so it never navigates */
.star-btn { position: absolute; top: 8px; right: 8px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.45); color: rgba(255,255,255,.6); font-size: 16px; line-height: 1; display: grid; place-items: center; backdrop-filter: blur(2px); transition: .15s; }
.star-btn:hover { background: rgba(0,0,0,.65); color: #fff; transform: scale(1.08); }
.star-btn.on { background: #f4b400; color: #1a1200; box-shadow: 0 2px 10px rgba(244,180,0,.5); }
.post-wrap[data-star="1"] .post { border-color: #f0c33c; }
/* niche row — chips + add, below the card */
.niche-row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .45rem .2rem 0; }
.niche { font-size: .68rem; font-weight: 600; background: #eef2fb; color: #3a4a80; border: 1px solid #dde4f5; border-radius: 999px; padding: .1rem .5rem; }
.niche-add { font-size: .68rem; color: #8a8f98; background: none; border: 1px dashed #cfd4dd; border-radius: 999px; padding: .1rem .5rem; cursor: pointer; }
.niche-add:hover { color: #3b5bdb; border-color: #3b5bdb; }
.post__bar { height: 8px; }
.post__body { padding: .9rem 1rem 1rem; }
.post__host { font-weight: 700; font-size: .92rem; word-break: break-all; }
.post__meta { font-size: .76rem; color: #667; margin-top: .35rem; display: flex; align-items: center; gap: .4rem; }
.post__meta .dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); display: inline-block; }
.post__font { font-size: .76rem; color: #888; margin-top: .35rem; font-family: ui-monospace, monospace; }
.post__date { font-size: .68rem; color: #aab; margin-top: .5rem; }

/* Rendered-capture gallery enrichments (consolidated into the existing teardown gallery) */
.post__shot{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;object-position:top;background:#f1f3f5;border-bottom:1px solid #e7eaee}
.rtag{font-size:.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#1a7a46;background:#e3f6ea;padding:.05rem .3rem;border-radius:4px;vertical-align:middle}
.conf{font-size:.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:.05rem .3rem;border-radius:4px;vertical-align:middle;cursor:help}
.conf--sparse{color:#9a3412;background:#ffedd5}.conf--partial{color:#854d0e;background:#fef9c3}.conf--rich{color:#166534;background:#dcfce7}
.surfs{display:flex;gap:4px;margin:.35rem 0}
.surf{flex:1;height:22px;border-radius:4px;border:1px solid rgba(0,0,0,.12);font:700 .58rem/22px ui-monospace,monospace;text-align:center;color:rgba(0,0,0,.45)}
.mtag{font-size:.62rem;font-weight:700;color:#8a6d12;background:#fff4d6;padding:.04rem .3rem;border-radius:4px}
.cap{font-size:.66rem;color:#9aa6b2}

/* Captured-screenshot strip + source badge (rendered vs regex) in the teardown view */
.shots{display:flex;gap:1rem;align-items:flex-start;margin:0 0 1rem;flex-wrap:wrap;position:relative}
.shots figure{margin:0;border:1px solid #e7eaee;border-radius:10px;overflow:hidden;background:#fff;box-shadow:0 4px 16px rgba(11,39,64,.06)}
.shots figcaption{font:600 .68rem/1 ui-monospace,monospace;color:#6b7589;padding:.4rem .6rem;border-bottom:1px solid #eef1f4;text-transform:uppercase;letter-spacing:.04em}
.shots .shot-d img{display:block;width:560px;max-width:60vw;height:auto}
.shots .shot-m img{display:block;width:200px;height:auto}
.srcbadge{position:absolute;top:.5rem;right:.5rem;font:700 .62rem/1 system-ui;text-transform:uppercase;letter-spacing:.04em;padding:.25rem .5rem;border-radius:5px;z-index:2}
.srcbadge--rendered{background:#e3f6ea;color:#1a7a46}
.srcbadge--regex{background:#fde7e7;color:#b3261e}
