:root {
  --bg: #0b0a09;
  --panel: #12110f;
  --panel-2: #181613;
  --ink: #ebe3d3;
  --soft: rgba(235,227,211,.64);
  --faint: rgba(235,227,211,.36);
  --line: rgba(235,227,211,.1);
  --line-2: rgba(235,227,211,.18);
  --brass: #c6a26a;
  --brass-soft: rgba(198,162,106,.14);
  --green: #7fae8c;
  --red: #d98473;
  --display: "Gloock", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "Cormorant SC", Georgia, serif;
  --pad: clamp(18px, 5vw, 72px);
  --max: 1240px;
  color-scheme: dark;
}
:root.paper {
  --bg: #f3ede1;
  --panel: #fbf7ef;
  --panel-2: #efe7d8;
  --ink: #1d1a15;
  --soft: rgba(29,26,21,.7);
  --faint: rgba(29,26,21,.42);
  --line: rgba(29,26,21,.12);
  --line-2: rgba(29,26,21,.22);
  --brass: #8d6a2f;
  --brass-soft: rgba(141,106,47,.12);
  --green: #3f7a52;
  --red: #a4483a;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 300 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; transition: background .4s, color .4s; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
::selection { background: var(--brass); color: var(--bg); }
:focus-visible { outline: 1px solid var(--brass); outline-offset: 3px; }

.grain { position: fixed; inset: 0; pointer-events: none; opacity: .05; z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.paper .grain { opacity: .08; mix-blend-mode: multiply; }

.mono { font-family: var(--mono); font-weight: 600; font-size: 14px; letter-spacing: .12em; text-transform: lowercase; font-variant-numeric: lining-nums; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: -.02em; }

/* masthead */
.mast { max-width: var(--max); margin: 0 auto; padding: 22px var(--pad) 0; }
.mast-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--soft); border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.controls { display: flex; align-items: center; gap: 10px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; }
.seg button { font-family: var(--mono); font-weight: 600; letter-spacing: .1em; font-size: 13px; padding: 3px 11px; border-radius: 999px; color: var(--faint); }
.seg button.on { background: var(--brass); color: var(--bg); }
.icon-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--soft); }
.chip-scope { border: 1px solid var(--brass); color: var(--brass); padding: 1px 10px; border-radius: 999px; font-size: 12px; }
.wordmark { font-size: clamp(64px, 11vw, 148px); line-height: .9; margin-top: 26px; transition: font-size .4s; }
.compact .wordmark { font-size: clamp(44px, 6vw, 72px); margin-top: 18px; }
.compact .tagline { display: none; }
.wordmark em { font-style: normal; color: var(--brass); }
.tagline { color: var(--soft); margin-top: 12px; }
.tabs { display: flex; gap: clamp(16px, 3vw, 36px); margin-top: 30px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { font-family: var(--mono); font-weight: 600; letter-spacing: .12em; font-size: 15px; padding: 10px 0 12px; color: var(--faint); border-bottom: 1px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .3s; }
.tabs a:hover { color: var(--soft); }
.tabs a.on { color: var(--ink); border-color: var(--brass); }

main { max-width: var(--max); margin: 0 auto; padding: 36px var(--pad) 80px; min-height: 50vh; }
.foot { max-width: var(--max); margin: 0 auto; padding: 24px var(--pad) 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--faint); border-top: 1px solid var(--line); }
.foot a:hover { color: var(--brass); }

/* shared */
.kicker { color: var(--brass); }
.muted { color: var(--soft); }
.faint { color: var(--faint); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.btn { font-family: var(--mono); font-weight: 600; letter-spacing: .1em; font-size: 14px; border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 14px; color: var(--soft); transition: all .25s; }
.btn:hover, .btn.on { border-color: var(--brass); color: var(--brass); }
.btn.solid { background: var(--brass); color: var(--bg); border-color: var(--brass); }
.empty { padding: 60px 0; text-align: center; color: var(--soft); }
.empty .display { font-size: 34px; color: var(--ink); margin-bottom: 8px; }
.skeleton { height: 18px; border-radius: 4px; background: linear-gradient(90deg, var(--panel), var(--panel-2), var(--panel)); background-size: 200% 100%; animation: sk 1.4s infinite; margin: 10px 0; }
@keyframes sk { to { background-position: -200% 0; } }

/* brief */
.brief-head { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: end; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.brief-head h2 { font-size: clamp(36px, 5.4vw, 72px); line-height: 1; margin-top: 10px; max-width: 18ch; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--soft); max-width: 62ch; margin-top: 18px; }
.brief-tools { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.brief-tools select { background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; font-family: var(--mono); font-weight: 600; letter-spacing: .08em; color: var(--soft); }
.top { margin-top: 34px; display: grid; gap: 0; }
.top-item { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.top-item .n { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--brass); }
.top-item h3 { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; }
.top-item h3 a:hover { color: var(--brass); }
.top-item .why { margin-top: 8px; color: var(--soft); }
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 18px; margin-top: 40px; }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; }
.section h4 { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.1; margin: 6px 0 14px; }
.section ul { list-style: none; display: grid; gap: 14px; }
.section li { padding-left: 18px; position: relative; }
.section li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 1px; background: var(--brass); }
.refs { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: 2px; }
.refs a { font-family: var(--mono); font-weight: 600; font-size: 12px; color: var(--brass); border: 1px solid var(--brass-soft); border-radius: 6px; padding: 0 6px; line-height: 18px; }
.refs a:hover { background: var(--brass-soft); }
.slack { margin-top: 40px; border: 1px dashed var(--line-2); border-radius: 14px; padding: 22px 26px; }
.slack pre { white-space: pre-wrap; font: 300 15px/1.6 var(--sans); color: var(--soft); margin-top: 12px; }

/* wire */
.filters { display: grid; gap: 14px; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 92%, transparent); padding-right: 30px; }
.chips.scroll .btn { white-space: nowrap; }
.also a { color: var(--soft); border-bottom: 1px solid var(--line-2); }
.also a:hover { color: var(--brass); }
.search { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-2); padding: 4px 0 8px; }
.search input { flex: 1; background: none; border: 0; outline: none; font-family: var(--display); font-size: 26px; color: var(--ink); min-width: 0; }
.search input::placeholder { color: var(--faint); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.range { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); }
.range input { accent-color: var(--brass); width: 110px; }
.count { color: var(--faint); }
.list { display: grid; }
.card { display: grid; grid-template-columns: 54px 1fr; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.card.seen h3 { color: var(--soft); }
.gauge { width: 46px; height: 46px; position: relative; }
.gauge svg { transform: rotate(-90deg); }
.gauge b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 15px; }
.meta { color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.meta .src { color: var(--soft); }
.card h3 { font-family: var(--display); font-weight: 400; font-size: clamp(21px, 2vw, 26px); line-height: 1.18; margin: 6px 0 8px; }
.card h3 a:hover { color: var(--brass); }
.card p { color: var(--soft); max-width: 78ch; }
.sowhat { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--brass); color: var(--ink); max-width: 78ch; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tag { font-family: var(--mono); font-weight: 600; letter-spacing: .08em; font-size: 12.5px; border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 10px; color: var(--soft); }
.tag.client { border-color: var(--brass); color: var(--brass); cursor: pointer; }
.tag.lens-revblack { color: var(--green); border-color: color-mix(in srgb, var(--green) 50%, transparent); }
.tag.lens-nock { color: var(--red); border-color: color-mix(in srgb, var(--red) 50%, transparent); }
.client-why { margin-top: 8px; color: var(--soft); font-size: 15px; }
.client-why b { color: var(--brass); font-weight: 500; }
.card-actions { display: flex; gap: 14px; margin-top: 10px; }
.card-actions button { font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: .1em; color: var(--faint); }
.card-actions button:hover { color: var(--brass); }
.new-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brass); display: inline-block; }

/* clients */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 24px; }
.ccard { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; transition: border-color .3s, transform .3s; display: flex; flex-direction: column; gap: 8px; }
.ccard:hover { border-color: var(--brass); transform: translateY(-2px); }
.ccard h4 { font-family: var(--display); font-weight: 400; font-size: 23px; line-height: 1.1; }
.ccard p { color: var(--soft); font-size: 14.5px; line-height: 1.5; }
.ccard .row { margin-top: auto; padding-top: 8px; }
.ccard .hot { color: var(--brass); }
.profile { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.profile h2 { font-size: clamp(40px, 5vw, 64px); line-height: 1; }
.confirm { color: var(--red); }

/* sources */
table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 15px; }
th { text-align: left; font-family: var(--mono); font-weight: 600; letter-spacing: .1em; color: var(--faint); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line-2); }
td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); color: var(--soft); vertical-align: top; }
td:first-child { color: var(--ink); }
.ok { color: var(--green); } .bad { color: var(--red); }

/* locked */
.locked { min-height: 46vh; display: grid; place-items: center; text-align: center; }
.seal { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 26px; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #7a1f25, #3a0a0e 70%); box-shadow: 0 10px 40px rgba(0,0,0,.5), inset 0 0 0 6px rgba(0,0,0,.18); font-family: var(--display); font-size: 40px; color: rgba(255,200,180,.55); }
.locked h2 { font-size: clamp(34px, 5vw, 56px); }
.locked p { color: var(--soft); margin-top: 10px; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; background: var(--brass); color: var(--bg); padding: 8px 18px; border-radius: 999px; font-family: var(--mono); font-weight: 600; letter-spacing: .1em; transition: all .35s; pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.fade { animation: fade .5s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 720px) {
  .brief-head, .profile { grid-template-columns: 1fr; }
  .brief-tools { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .card, .top-item { grid-template-columns: 1fr; gap: 6px; }
  .gauge { width: 38px; height: 38px; }
  .search input { font-size: 21px; }
  .filters { position: static; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
