.address-profile-root {
  min-width: 0;
}
.address-profile-state {
  display: flex;
  min-height: 460px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  border: 1px dashed #afcbc5;
  border-radius: var(--radius-md);
  padding: 40px;
  background: rgba(221, 241, 236, 0.42);
  color: var(--color-primary);
  text-align: center;
}
.address-profile-state strong {
  font-size: 18px;
  line-height: 24px;
}
.address-profile-state p {
  max-width: 460px;
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 19px;
}
.v3-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--color-mist);
  color: var(--color-primary);
}
.v3-state-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.5;
}
.address-profile-state--loading .v3-state-icon {
  animation: v3-pulse 1.1s ease-in-out infinite alternate;
}
.address-profile-state--error,
.address-profile-state--invalid {
  border-color: #e9b7bf;
  background: #fbe9ec;
}
.address-profile-state--error .v3-state-icon,
.address-profile-state--invalid .v3-state-icon {
  background: #f3cfd5;
  color: var(--color-danger);
}
.address-profile-view {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 22px;
}
.address-profile-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.profile-heading-copy {
  min-width: 0;
}
.profile-truth-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 8px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
}
.profile-observed-label {
  border-radius: var(--radius-pill);
  padding: 4px 8px;
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 14px;
}
.address-profile-header h2 {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: clamp(26px, 3vw, 34px);
  font-variation-settings: "wght" 650;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.address-profile-header p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 20px;
}
.profile-heading-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  padding: 8px 8px 8px 0;
}
.profile-unavailable-action,
.profile-fill-panel > header > button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  gap: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0 18px;
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  cursor: not-allowed;
  opacity: 1;
}
.profile-unavailable-action--primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-accent);
  color: #fff;
}
.profile-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.profile-metric {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  border-right: 1px solid var(--color-border);
  padding: 17px 18px;
}
.profile-metric:last-child {
  border-right: 0;
}
.profile-metric .metric-label {
  margin: 0;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 15px;
}
.profile-metric strong {
  overflow: hidden;
  color: var(--color-ink);
  font-size: clamp(17px, 1.8vw, 23px);
  font-weight: 700;
  line-height: 28px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-metric-note {
  overflow: hidden;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-metric--positive strong,
.profile-metric--positive .profile-metric-note {
  color: var(--color-success);
}
.profile-metric--negative strong,
.profile-metric--negative .profile-metric-note,
.profile-closed-pnl--negative,
.profile-position-pnl--negative {
  color: var(--color-danger);
}
.profile-metric--unavailable strong {
  color: var(--color-warning);
  font-size: 18px;
}
.profile-evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: 18px;
}
.profile-curve-card,
.profile-detail-panel,
.profile-fill-panel {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.profile-curve-card {
  display: flex;
  height: 328px;
  min-height: 328px;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px;
}
.profile-curve-card > header,
.profile-detail-panel > header,
.profile-fill-panel > header,
.profile-curve-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.profile-curve-card h3,
.profile-detail-panel h3,
.profile-fill-panel h3 {
  margin: 0;
  color: var(--color-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 23px;
}
.profile-curve-card header p,
.profile-fill-panel header p,
.profile-curve-card footer p {
  margin: 3px 0 0;
  color: var(--color-muted);
  font-size: 11px;
  line-height: 16px;
}
.profile-window-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  border-radius: var(--radius-pill);
  padding: 4px;
  background: var(--color-ground);
}
.profile-window {
  min-width: 0;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 5px 9px;
  background: transparent;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 13px;
  cursor: pointer;
}
.profile-window--active {
  padding-inline: 10px;
  background: var(--color-primary);
  color: var(--color-accent);
}
.profile-curve-shell {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  aspect-ratio: auto;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(to right, rgba(202, 216, 212, 0.52) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(202, 216, 212, 0.52) 1px, transparent 1px),
    linear-gradient(180deg, rgba(221, 241, 236, 0.55), rgba(251, 252, 248, 0.15));
  background-size: 25% 100%, 100% 33.333%, 100% 100%;
}
.profile-curve {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
  padding: 12px;
}
.profile-curve polyline {
  fill: none;
  stroke: var(--color-success);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}
.profile-curve-empty {
  display: flex;
  height: 100%;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
  color: var(--color-muted);
  text-align: center;
}
.profile-coverage-note {
  margin: 0;
}
.profile-exposure-panel {
  display: flex;
  height: 328px;
  min-height: 328px;
  flex-direction: column;
  gap: 17px;
  border-color: #afcbc5;
  padding: 20px;
  background: var(--color-mist);
}
.profile-detail-panel > header > span {
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 14px;
}
.profile-position-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 13px;
  overflow-y: auto;
}
.profile-detail-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.profile-position-heading,
.profile-position-facts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.profile-position-heading strong {
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 17px;
}
.profile-position-pnl {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
}
.profile-position-pnl--positive,
.profile-closed-pnl--positive {
  color: var(--color-success);
}
.profile-position-pnl--neutral,
.profile-closed-pnl--neutral {
  color: var(--color-muted);
}
.profile-position-bar {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(23, 138, 104, 0.16);
}
.profile-position-bar span {
  display: block;
  width: 62%;
  height: 100%;
  border-radius: inherit;
  background: var(--color-success);
}
.profile-position-facts {
  align-items: flex-start;
  flex-wrap: wrap;
}
.profile-position-facts > span {
  display: flex;
  min-width: 70px;
  flex-direction: column;
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 13px;
}
.profile-position-facts small {
  margin-bottom: 2px;
  color: var(--color-muted);
  font-size: 8px;
  line-height: 11px;
}
.profile-position-facts strong {
  font-weight: 500;
}
.profile-exposure-note {
  margin: auto 0 0;
  padding-top: 2px;
  color: var(--color-muted);
  font-size: 11px;
  line-height: 16px;
}
.profile-detail-empty {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: var(--color-primary);
  text-align: center;
}
.profile-detail-empty span {
  color: var(--color-muted);
  font-size: 11px;
  line-height: 16px;
}
.profile-fill-panel {
  overflow: hidden;
}
.profile-fill-panel > header {
  min-height: 52px;
  border-bottom: 1px solid var(--color-border);
  padding: 8px 18px;
}
.profile-fill-panel > header > button {
  height: 34px;
  border: 0;
  padding: 0 10px;
  color: var(--color-primary);
  font-size: 11px;
}
.profile-table-scroll {
  width: 100%;
  max-height: 304px;
  overflow-y: auto;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.profile-fill-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 14px;
}
.profile-fill-table th,
.profile-fill-table td {
  padding: 10px 18px;
  text-align: left;
  vertical-align: middle;
}
.profile-fill-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  border: 0;
  background: var(--color-ground);
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 400;
  line-height: 13px;
}
.profile-fill-table td {
  height: 48px;
  border-top: 1px solid var(--color-border);
}
.profile-fill-table td:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}
.profile-fill-table time {
  color: var(--color-muted);
}
.profile-side,
.profile-evidence-label {
  font-weight: 600;
}
.profile-side--buy,
.profile-evidence-label {
  color: var(--color-success);
}
.profile-side--sell {
  color: var(--color-danger);
}
.profile-fill-panel > footer {
  border-top: 1px solid var(--color-border);
  padding: 10px 18px;
  color: var(--color-muted);
  font-size: 10px;
  line-height: 15px;
}
.profile-detail-empty--table {
  min-height: 130px;
}
.leader-filter-draft {
  margin-top: 18px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.leader-filter-draft__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 24px 18px;
}
.leader-filter-draft__header h2 {
  margin: 9px 0 8px;
  color: var(--color-primary);
  font-size: 22px;
  line-height: 1.1;
}
.leader-filter-draft__header p {
  max-width: 630px;
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 20px;
}
.leader-filter-draft__status {
  flex: 0 0 auto;
  border: 1px solid var(--color-border);
  padding: 7px 9px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.leader-filter-draft__truth {
  margin: 0 24px 18px;
}
.leader-filter-draft form {
  display: grid;
  gap: 16px;
  padding: 0 24px 24px;
}
.leader-filter-draft__fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--color-border);
  padding: 16px;
}
.leader-filter-draft__fieldset legend {
  padding: 0 7px;
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.leader-filter-draft__fieldset label {
  display: grid;
  gap: 7px;
  color: var(--color-primary);
  font-size: 12px;
  line-height: 18px;
}
.leader-filter-draft__options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.leader-filter-draft__options label,
.leader-filter-draft__fieldset .leader-filter-draft__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}
.leader-filter-draft input[type="radio"],
.leader-filter-draft input[type="checkbox"] {
  width: auto;
  accent-color: var(--color-success);
}
.leader-filter-draft__asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.leader-filter-draft input:not([type="radio"]):not([type="checkbox"]),
.leader-filter-draft select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--color-border);
  background: var(--color-ground);
  padding: 10px 12px;
  color: var(--color-primary);
  font: inherit;
}
.leader-filter-draft__unavailable {
  margin: 0;
  border-left: 2px solid var(--color-warning);
  background: color-mix(in srgb, var(--color-warning) 9%, transparent);
  padding: 11px 13px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 18px;
}
.leader-filter-draft__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.leader-filter-draft__actions button {
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: var(--color-surface);
  cursor: pointer;
}
.leader-filter-draft__feedback {
  display: grid;
  gap: 7px;
  border: 1px solid var(--color-border);
  padding: 13px 15px;
  font-size: 12px;
  line-height: 18px;
}
.leader-filter-draft__feedback--error {
  border-color: color-mix(
    in srgb,
    var(--color-danger) 55%,
    var(--color-border)
  );
  color: var(--color-danger);
}
.leader-filter-draft__feedback--ready {
  border-color: color-mix(
    in srgb,
    var(--color-success) 55%,
    var(--color-border)
  );
  color: var(--color-success);
}
.leader-filter-draft__feedback ul {
  margin: 0;
  padding-left: 18px;
}
@keyframes v3-pulse {
  from {
    transform: scale(0.96);
    opacity: 0.72;
  }
  to {
    transform: scale(1.04);
    opacity: 1;
  }
}
@media (max-width: 1100px) {
  .profile-metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .profile-metric:nth-child(3) {
    border-right: 0;
  }
  .profile-metric:nth-child(n + 4) {
    border-top: 1px solid var(--color-border);
  }
  .profile-evidence-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .v3-app-shell {
    grid-template-columns: 196px minmax(0, 1fr);
  }
  .v3-app-sidebar {
    width: 196px;
    padding-inline: 16px;
  }
  .v3-lookup-header.address-profile-intro,
  .address-profile-header {
    align-items: stretch;
    flex-direction: column;
  }
  .address-profile-form {
    width: 100%;
    flex-basis: auto;
  }
  .profile-heading-actions {
    align-self: flex-start;
  }
}
@media (max-width: 760px) {
  .v3-app-shell {
    display: block;
    min-height: 100dvh;
  }
  .v3-app-sidebar {
    position: static;
    display: flex;
    width: 100%;
    height: auto;
    min-height: 0;
    gap: 18px;
    padding: calc(18px + var(--safe-area-top))
      calc(14px + var(--safe-area-right)) 12px
      calc(14px + var(--safe-area-left));
  }
  .v3-sidebar-main {
    gap: 18px;
  }
  .v3-primary-nav {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 8px 8px;
    scrollbar-width: none;
  }
  .v3-primary-nav::-webkit-scrollbar {
    display: none;
  }
  .v3-nav-item {
    width: auto;
    flex: 0 0 auto;
    padding-inline: 12px;
  }
  .v3-nav-note,
  .v3-sidebar-footer {
    display: none;
  }
  .v3-app-topbar {
    position: static;
    height: 64px;
    padding: 0 18px;
  }
  .v3-topbar-status {
    gap: 8px;
  }
  .v3-status-pill--unavailable {
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    flex: 0 0 54px;
    overflow: visible;
    padding: 0;
  }
  .v3-status-pill--unavailable .v3-status-label {
    display: none;
  }
  .v3-status-pill--unavailable::before {
    width: 100%;
    color: var(--color-primary);
    content: "PRIVY";
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: center;
  }
  .v3-leader-workspace.address-profile-shell {
    padding: 24px calc(16px + var(--safe-area-right))
      calc(24px + env(safe-area-inset-bottom, 0px))
      calc(16px + var(--safe-area-left));
  }
  .v3-lookup-header.address-profile-intro {
    gap: 20px;
  }
  .address-profile-input-row {
    align-items: stretch;
    flex-direction: column;
  }
  .address-profile-input-row button {
    width: 100%;
  }
  .v3-truth-strip {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .v3-truth-strip p {
    min-width: calc(100% - 90px);
  }
  .v3-truth-mode {
    margin-left: 0;
  }
  .address-profile-state {
    min-height: 360px;
    padding: 28px 20px;
  }
  .profile-heading-actions {
    width: 100%;
    padding-right: 8px;
  }
  .profile-unavailable-action {
    flex: 1 1 0;
  }
  .profile-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-metric,
  .profile-metric:nth-child(3) {
    border-right: 1px solid var(--color-border);
  }
  .profile-metric:nth-child(even) {
    border-right: 0;
  }
  .profile-metric:nth-child(n + 3) {
    border-top: 1px solid var(--color-border);
  }
  .profile-metric:last-child {
    grid-column: 1 / -1;
    border-right: 0;
  }
  .profile-curve-card > header {
    align-items: flex-start;
    flex-direction: column;
  }
  .profile-window-controls {
    align-self: stretch;
    justify-content: space-between;
  }
  .profile-window {
    flex: 1 1 auto;
  }
  .leader-filter-draft__header,
  .leader-filter-draft__truth,
  .leader-filter-draft form {
    padding-left: 16px;
    padding-right: 16px;
  }
  .leader-filter-draft__truth {
    margin-left: 16px;
    margin-right: 16px;
  }
  .leader-filter-draft__header {
    flex-direction: column;
    gap: 14px;
  }
  .leader-filter-draft__asset-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 460px) {
  .v3-breadcrumb > span,
  .v3-breadcrumb svg {
    display: none;
  }
  .v3-status-pill:first-child {
    padding-inline: 9px;
    letter-spacing: 0.03em;
  }
  .profile-metric strong {
    font-size: 16px;
  }
  .profile-curve-card,
  .profile-exposure-panel {
    padding: 18px;
  }
  .profile-position-facts > span {
    width: calc(50% - 6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .address-profile-state--loading .v3-state-icon {
    animation: none;
  }
}
