html {
  min-height: 100%;
  background: var(--color-ground);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  background: var(--color-ground);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-synthesis: none;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.v3-app-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  width: 100%;
  min-height: 100dvh;
  background: var(--color-ground);
}

.v3-app-sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 228px;
  height: 100dvh;
  min-height: 680px;
  padding: calc(28px + var(--safe-area-top)) 20px
    calc(24px + var(--safe-area-bottom));
  background: var(--color-primary);
  color: #fff;
}

.v3-sidebar-main {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.v3-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  color: #fff;
  font-size: 17px;
  font-variation-settings: "wght" 750;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 22px;
  text-decoration: none;
}

.v3-brand:focus-visible {
  border-radius: var(--radius-sm);
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

.v3-brand-mark {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(184, 255, 103, 0.16);
}

.v3-primary-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  min-width: 0;
  gap: 12px;
  margin: 0;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  background: transparent;
  color: #b9ceca;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
  text-decoration: none;
}

.v3-nav-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: #9db6b2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.v3-nav-item--active {
  background: #174d48;
  color: #fff;
  font-weight: 600;
}

.v3-nav-item--active svg {
  stroke: var(--color-accent);
}

a.v3-nav-item:hover {
  background: #174d48;
}

.v3-nav-item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

button.v3-nav-item:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.v3-nav-note {
  margin-left: auto;
  color: #86a8a3;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  line-height: 12px;
  text-transform: uppercase;
}

.code-gap-marker {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-surface);
  border-radius: var(--radius-pill);
  background: var(--color-warning);
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  line-height: 12px;
}

.v3-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v3-runtime-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #315c57;
  border-radius: var(--radius-sm);
  padding: 14px;
  background: #0b403b;
  color: #b9ceca;
  font-size: 12px;
  line-height: 18px;
}

.v3-runtime-label {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 14px;
}

.v3-local-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}

.v3-local-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 12px;
  font-variation-settings: "wght" 750;
  font-weight: 750;
  line-height: 16px;
}

.v3-local-user > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.v3-local-user strong {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 17px;
}

.v3-local-user small {
  color: #86a8a3;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 15px;
}

.v3-app-main {
  min-width: 0;
  min-height: 100dvh;
  background: var(--color-ground);
}

.v3-app-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 78px;
  border-bottom: 1px solid var(--color-border);
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.v3-breadcrumb,
.v3-topbar-status,
.v3-status-pill {
  display: flex;
  align-items: center;
}

.v3-breadcrumb {
  gap: 10px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 18px;
}

.v3-breadcrumb svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #8a9b98;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.v3-breadcrumb strong {
  color: var(--color-primary);
  font-weight: 600;
}

.v3-topbar-status {
  gap: 12px;
}

.v3-status-pill {
  position: relative;
  height: 34px;
  gap: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0 12px;
  background: var(--color-surface);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 14px;
}

.v3-status-pill--mist {
  border-color: transparent;
  background: var(--color-mist);
}

.v3-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: var(--radius-pill);
  background: var(--color-success);
}

.v3-leader-workspace.address-profile-shell {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 34px 44px 42px;
  background: var(--color-ground);
  box-shadow: none;
}

.v3-lookup-header.address-profile-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin: 0 0 22px;
}

.v3-lookup-copy {
  min-width: 0;
  max-width: 620px;
}

.v3-kicker,
.v3-truth-label,
.v3-truth-mode {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 14px;
}

.v3-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--color-success);
}

.v3-lookup-copy h1 {
  max-width: none;
  margin: 0 0 7px;
  color: var(--color-ink);
  font-size: clamp(30px, 3.2vw, 40px);
  font-variation-settings: "wght" 750;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.v3-lookup-copy p,
.v3-form-hint,
.v3-truth-strip p {
  margin: 0;
  color: var(--color-muted);
}

.v3-lookup-copy p {
  font-size: 14px;
  line-height: 20px;
}

.address-profile-form {
  width: min(100%, 480px);
  flex: 0 1 480px;
}

.address-profile-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.address-profile-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.address-profile-input-row input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0 16px;
  background: var(--color-surface);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
}

.address-profile-input-row input::placeholder {
  color: #91a09d;
}

.address-profile-input-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  flex: 0 0 auto;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0 18px;
  background: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  cursor: pointer;
}

.address-profile-input-row button svg,
.profile-unavailable-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--color-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.address-profile-input-row input:focus-visible,
.address-profile-input-row button:focus-visible,
.profile-window:focus-visible {
  outline: 3px solid rgba(184, 255, 103, 0.9);
  outline-offset: 2px;
}

.v3-form-hint {
  padding: 7px 14px 0;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 13px;
}

.v3-truth-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 22px;
  border-left: 4px solid var(--color-info);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: #e7f5f8;
}

.v3-truth-label {
  flex: 0 0 auto;
  color: var(--color-primary);
}

.v3-truth-strip p {
  flex: 1 1 auto;
  font-size: 12px;
  line-height: 17px;
}

.v3-truth-mode {
  flex: 0 0 auto;
  color: var(--color-success);
}
