/* Lex Mentis — Attorney Check. Single committed dark look: black translucent curtains over drifting light. */
:root {
  color-scheme: dark;
  --ink: #07080a;
  --ink-2: #0d0f13;
  --curtain: rgba(12, 13, 17, 0.58);
  --curtain-hi: rgba(18, 19, 24, 0.72);
  --line: rgba(236, 232, 222, 0.09);
  --line-hi: rgba(200, 164, 93, 0.45);
  --text: #ece8de;
  --muted: #9a968c;
  --faint: #6b6861;
  --brass: #c8a45d;
  --brass-soft: rgba(200, 164, 93, 0.14);
  --steel: #7c93b3;
  --red: #f0524f;
  --red-soft: rgba(240, 82, 79, 0.14);
  --amber: #e7a93b;
  --amber-soft: rgba(231, 169, 59, 0.13);
  --green: #5cc08e;
  --green-soft: rgba(92, 192, 142, 0.12);
  --grey: #8b8f98;
  --grey-soft: rgba(139, 143, 152, 0.14);
  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 3px;
}
* { box-sizing: border-box; }
html { background: var(--ink); }
body {
  margin: 0; min-height: 100vh; background: var(--ink); color: var(--text);
  font: 400 16px/1.55 var(--f-body); -webkit-font-smoothing: antialiased;
  padding-inline: var(--gutter); overflow-x: hidden;
}
a { color: inherit; }
::selection { background: var(--brass); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.mono { font-family: var(--f-mono); font-size: 0.86em; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }

/* ---------- ambient light + grain */
#ambient { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.09; mix-blend-mode: overlay;
  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 type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.shell { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; }

/* ---------- top bar */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 20px; justify-content: space-between;
  padding-block: 14px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
  background: linear-gradient(var(--ink) 30%, rgba(7, 8, 10, 0));
}
.wordmark { text-decoration: none; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.wordmark b { font: 600 20px/1 var(--f-display); letter-spacing: 0.02em; }
.wordmark span { font: 500 11px/1 var(--f-body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); }
.bar nav { display: flex; gap: 22px; font-size: 14px; }
.bar nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--text); }
.bar .mini { flex: 1; max-width: 460px; }
@media (max-width: 720px) { .bar .mini { display: none; } .bar nav { gap: 14px; } }

/* ---------- home */
.home { min-height: calc(100vh - 170px); display: grid; align-content: center; justify-items: center; text-align: center; padding-block: 6vh 4vh; }
.eyebrow { font: 500 11.5px/1 var(--f-body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass); margin: 0 0 22px; }
.home h1 {
  font: 400 clamp(40px, 7.2vw, 88px)/0.98 var(--f-display); letter-spacing: -0.015em; margin: 0 0 34px;
  text-wrap: balance; max-width: 16ch;
}
.home h1 em { display: block; font-style: italic; color: var(--brass); font-size: 1.12em; letter-spacing: -0.01em; }
.tabs { display: inline-flex; gap: 2px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs button {
  appearance: none; background: none; border: 0; color: var(--muted); font: 500 13px/1 var(--f-body);
  letter-spacing: 0.14em; text-transform: uppercase; padding: 10px 18px 12px; cursor: pointer; position: relative;
}
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--brass); }

.search { position: relative; display: flex; width: min(720px, 100%); }
.search input {
  flex: 1; min-width: 0; font: 400 19px/1 var(--f-body); color: var(--text);
  background: var(--curtain); border: 1px solid var(--line); border-right: 0;
  padding: 20px 22px; border-radius: var(--radius) 0 0 var(--radius);
  backdrop-filter: blur(16px) saturate(120%); -webkit-backdrop-filter: blur(16px) saturate(120%);
  transition: border-color .25s, background .25s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--line-hi); background: var(--curtain-hi); }
.search button {
  font: 600 13px/1 var(--f-body); letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--brass); color: var(--ink); border: 0; padding: 0 28px; cursor: pointer;
  border-radius: 0 var(--radius) var(--radius) 0; transition: filter .2s;
}
.search button:hover { filter: brightness(1.12); }
.search.small input { font-size: 15px; padding: 11px 14px; }
.search.small button { padding: 0 16px; font-size: 11px; }
.try { margin: 16px 0 0; font-size: 13.5px; color: var(--faint); }
.try a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--faint); margin: 0 4px; }
.try a:hover { color: var(--text); }
.adv-toggle {
  margin-top: 20px; background: none; border: 0; color: var(--muted); cursor: pointer;
  font: 500 12.5px/1 var(--f-body); letter-spacing: 0.08em; padding: 6px 2px;
  border-bottom: 1px solid transparent;
}
.adv-toggle:hover, .adv-toggle[aria-expanded="true"] { color: var(--brass); border-bottom-color: var(--brass); }
.stats { margin-top: 40px; font-size: 13px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; }
.stats b { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- advanced options (drops like a curtain) */
.adv-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s cubic-bezier(.2, .8, .2, 1); width: min(980px, 100%); }
.adv-wrap.open { grid-template-rows: 1fr; }
.adv-wrap > div { overflow: hidden; }
.adv {
  margin-top: 22px; text-align: left; padding: 26px clamp(18px, 3vw, 32px) 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px 28px;
}
.adv fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.adv legend { font: 500 11px/1 var(--f-body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); margin-bottom: 12px; padding: 0; }
.field { display: grid; gap: 5px; }
.field > span, .adv .lbl { font-size: 12px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adv input[type=text], .adv input[type=number], .adv input[type=month], .adv select {
  width: 100%; font: 400 14px/1.2 var(--f-body); color: var(--text); background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 10px;
}
.adv select option { background: var(--ink-2); }
.adv input:focus, .adv select:focus { outline: none; border-color: var(--line-hi); }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 20px; padding: 5px 11px; cursor: pointer; transition: all .2s;
}
.checks input { position: absolute; opacity: 0; pointer-events: none; }
.checks label:has(input:checked) { color: var(--ink); background: var(--brass); border-color: var(--brass); }
.checks label:has(input:focus-visible) { outline: 2px solid var(--brass); outline-offset: 2px; }
.adv-actions { grid-column: 1 / -1; display: flex; gap: 12px; justify-content: flex-end; align-items: center; border-top: 1px solid var(--line); padding-top: 18px; }
.btn { font: 600 12px/1 var(--f-body); letter-spacing: 0.14em; text-transform: uppercase; padding: 13px 20px; border-radius: var(--radius); cursor: pointer; border: 1px solid var(--line); background: none; color: var(--muted); text-decoration: none; }
.btn:hover { color: var(--text); border-color: var(--muted); }
.btn.primary { background: var(--brass); color: var(--ink); border-color: var(--brass); }
.btn.primary:hover { filter: brightness(1.1); }

/* ---------- the curtain (every panel) */
.curtain {
  --mx: 50%; --my: 0%; --shade: 0;
  position: relative; display: block; text-decoration: none; color: inherit;
  background: var(--curtain);
  border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(125%); -webkit-backdrop-filter: blur(18px) saturate(125%);
  padding: 26px 24px 28px;
  transform-origin: 50% 0%;
  transition: background .35s, border-color .35s, translate .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s;
  will-change: transform, clip-path;
  isolation: isolate;
}
/* pleats: soft vertical folds that sway on hover */
.curtain::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, calc(var(--shade) * .6)), transparent 30%, transparent 70%, rgba(0, 0, 0, calc(var(--shade) * .8))),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, rgba(0, 0, 0, 0.10) 14px, rgba(255, 255, 255, 0.022) 28px, rgba(0, 0, 0, 0.06) 42px);
  background-size: 100% 100%, 84px 100%;
  background-position: 0 0, 0 0;
  transition: background-position 1.4s cubic-bezier(.2, .8, .2, 1);
}
/* cursor-following brass sheen */
.curtain::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; opacity: 0;
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(200, 164, 93, 0.17), transparent 42%);
  transition: opacity .35s;
}
a.curtain:hover, .curtain.hoverable:hover { background: var(--curtain-hi); border-color: var(--line-hi); translate: 0 -6px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }
a.curtain:hover::before, .curtain.hoverable:hover::before { background-position: 0 0, 42px 0; }
.curtain:hover::after { opacity: 1; }

.curtain.lvl-red { border-color: rgba(240, 82, 79, 0.35); box-shadow: inset 0 1px 0 rgba(240, 82, 79, .35), inset 0 0 60px -20px rgba(240, 82, 79, .35); }
.curtain.lvl-amber { border-color: rgba(231, 169, 59, 0.28); box-shadow: inset 0 1px 0 rgba(231, 169, 59, .3); }
a.curtain.lvl-red:hover { border-color: var(--red); }

/* unfurl when results arrive */
@keyframes unfurl {
  from { opacity: 0.001; clip-path: inset(0 0 100% 0); translate: 0 -14px; }
  to { opacity: 1; clip-path: inset(0 0 0 0); translate: 0 0; }
}
.unfurl { animation: unfurl .8s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 55ms); }

/* ---------- chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font: 600 10.5px/1 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 9px 5px; border-radius: 2px; white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.red { color: var(--red); background: var(--red-soft); }
.chip.amber { color: var(--amber); background: var(--amber-soft); }
.chip.green { color: var(--green); background: var(--green-soft); }
.chip.grey { color: var(--grey); background: var(--grey-soft); }

/* ---------- results */
.rhead { display: grid; gap: 14px; padding-block: 26px 22px; }
.rhead h1 { font: 400 clamp(30px, 4.6vw, 52px)/1.05 var(--f-display); margin: 0; text-wrap: balance; }
.rhead h1 em { color: var(--brass); }
.rmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 13.5px; color: var(--muted); }
.rmeta select { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; font: inherit; }
.rmeta select option { background: var(--ink-2); }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--text); border: 1px solid var(--line-hi); background: var(--brass-soft); border-radius: 20px; padding: 4px 6px 4px 11px; }
.fchip button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.fchip button:hover { color: var(--text); }
.progress { height: 1px; background: var(--line); position: relative; overflow: hidden; }
.progress i { position: absolute; inset: 0 auto 0 0; background: var(--brass); width: 0; transition: width .2s; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 22px; padding-bottom: 30px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 22px; }
.card-top .mono { color: var(--faint); }
.cname { font: 400 27px/1.08 var(--f-display); margin: 0 0 10px; letter-spacing: -0.005em; text-wrap: balance; }
.cname em { font-style: italic; color: var(--muted); }
.cfirm { margin: 0 0 18px; color: var(--text); font-size: 15px; min-height: 1.5em; }
.cfirm.none { color: var(--faint); font-style: italic; }
.cmeta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.cmeta .warn { color: var(--red); }
.more { display: flex; justify-content: center; padding-block: 10px 40px; }
.empty { padding: 40px 28px; text-align: center; color: var(--muted); }
.empty h2 { font: 400 28px/1.2 var(--f-display); color: var(--text); margin: 0 0 8px; }

/* ---------- profile */
.crumb { font-size: 13px; color: var(--muted); padding-top: 18px; }
.crumb a { text-decoration: none; } .crumb a:hover { color: var(--text); }
.phero { padding-block: 22px 30px; display: grid; gap: 16px; }
.phero h1 { font: 400 clamp(40px, 7vw, 84px)/0.98 var(--f-display); margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
.phero h1 em { font-style: italic; color: var(--muted); }
.phero .line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; color: var(--muted); font-size: 14px; }
.pgrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; padding-bottom: 40px; }
.span-12 { grid-column: span 12; } .span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
@media (max-width: 860px) { .span-7, .span-5, .span-6 { grid-column: span 12; } }
.ptitle { font: 500 11px/1 var(--f-body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass); margin: 0 0 18px; display: flex; justify-content: space-between; gap: 12px; }
.ptitle .count { color: var(--faint); letter-spacing: 0.1em; }
.flags { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.flags li { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.flags li:last-child { border-bottom: 0; padding-bottom: 0; }
.flags .when { grid-column: 2; font-size: 12.5px; color: var(--muted); }
.flags strong { font: 400 22px/1.2 var(--f-display); }
.flags .det { grid-column: 2; font-size: 14px; color: var(--muted); max-width: 70ch; }
.flags .src { grid-column: 2; font-size: 12.5px; color: var(--faint); }
.flags .src a { color: var(--brass); }
.clear-note { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.clear-note strong { font: 400 24px/1.2 var(--f-display); color: var(--green); }
.clear-note span { color: var(--muted); font-size: 14px; }
.firmname { font: 400 clamp(26px, 3.4vw, 38px)/1.1 var(--f-display); margin: 0 0 14px; }
.firmname a { text-decoration: none; background-image: linear-gradient(var(--brass), var(--brass)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .4s; }
.firmname a:hover { background-size: 100% 1px; }
.since { display: grid; gap: 4px; margin: 0 0 18px; padding: 14px 0; border-block: 1px solid var(--line); }
.since .k { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.since .v { font: 400 26px/1.1 var(--f-display); color: var(--brass); }
.since .n { font-size: 13px; color: var(--faint); }
.addr { color: var(--muted); font-size: 14.5px; margin: 0; }
dl.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 12px 18px; margin: 0; font-size: 14.5px; }
dl.kv dt { color: var(--muted); font-size: 12.5px; letter-spacing: 0.04em; padding-top: 2px; }
dl.kv dd { margin: 0; } dl.kv dd small { display: block; color: var(--faint); font-size: 12.5px; margin-top: 3px; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; }
.tl li { display: grid; grid-template-columns: 118px 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tl li:last-child { border-bottom: 0; }
.tl .d { color: var(--muted); font-size: 13px; }
.tl .t { display: grid; gap: 4px; font-size: 14.5px; }
.tl .t b { font-weight: 500; }
.tl .t small { color: var(--faint); font-size: 12.5px; }
.tl .t a { color: var(--brass); }
@media (max-width: 520px) { .tl li { grid-template-columns: 1fr; gap: 4px; } }
details.unv { margin-top: 16px; font-size: 13.5px; color: var(--muted); }
details.unv summary { cursor: pointer; color: var(--faint); }
.verify { display: inline-flex; gap: 8px; align-items: center; color: var(--brass); text-decoration: none; font-size: 14px; border-bottom: 1px solid var(--line-hi); padding-bottom: 2px; }

/* ---------- firm roster */
.roster { list-style: none; padding: 0; margin: 0; display: grid; }
.roster li a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .3s, background .3s; }
.roster li a:hover { padding-inline: 10px; background: rgba(200, 164, 93, 0.06); }
.roster .nm { font: 400 20px/1.2 var(--f-display); }
.roster .sub { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }

/* ---------- about */
.prose { max-width: 68ch; font-size: 15.5px; color: var(--muted); }
.prose h2 { font: 400 26px/1.2 var(--f-display); color: var(--text); margin: 30px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose strong { color: var(--text); font-weight: 500; }
.prose a { color: var(--brass); }

/* ---------- footer */
.foot { position: relative; z-index: 2; max-width: 1180px; margin: 30px auto 0; padding-block: 26px 40px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.asof { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 22px; }
.asof b { color: var(--text); font-weight: 500; }
.asof .first b { color: var(--brass); }
.fine { font-size: 12px; color: var(--faint); max-width: 110ch; margin: 0; }
.fine a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .curtain { will-change: auto; }
}

/* the advanced form is itself a curtain; keep its grid layout */
.adv.curtain { display: grid; }
.preview-note { position: relative; z-index: 3; text-align: center; font-size: 12px; letter-spacing: .08em; color: var(--ink); background: var(--brass); padding: 6px 12px; margin-inline: calc(-1 * var(--gutter)); }
.preview-note a { color: var(--ink); font-weight: 600; text-decoration: underline; }
@media (max-width: 520px) {
  .bar { flex-wrap: wrap; row-gap: 8px; }
  .bar nav { gap: 16px; font-size: 13px; }
  .search input { font-size: 16px; padding: 16px 14px; }
  .search button { padding: 0 16px; font-size: 11.5px; letter-spacing: .12em; }
}
